https://github.com/mettle/abstraction-test
https://github.com/mettle/abstraction-test
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mettle/abstraction-test
- Owner: mettle
- Created: 2021-06-18T08:38:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-18T08:40:45.000Z (about 5 years ago)
- Last Synced: 2025-03-02T14:20:40.414Z (over 1 year ago)
- Language: PHP
- Size: 75.2 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Abstraction
## Structure
There are two models:
- Project
- Task
Tasks belong to projects. Projects can have multiple tasks.
## Setup
The project includes Laravel Sail. To bring the project up, run `./vendor/bin/sail up`.
## Use
There are three endpoints:
- GET /api/projects
- POST /api/projects
- DELETE /api/projects/{project}
### Creating New Projects
To create a new project, you must `POST` to the `/api/projects` endpoint with data that looks like the following:
```json
{
"name": "Example Project",
"tasks": [
{
"title": "Task 1",
"description": "This is a task"
},
{
"title": "Task 2",
"description": "This is also a task"
}
]
}
```
## Tests
There is one test, which checks to see that a project can be created with tasks.
To run the tests, run `./vendor/bin/sail art test`.