- Clone the repo
- Install vendor dependencies:
docker run --rm --interactive --tty --volume $PWD:/app composer install --ignore-platform-reqs --no-scripts - In case of missing classes:
docker run --rm --interactive --tty --volume $PWD:/app composer dump-autoload - Copy env file:
cp .env.example .env - Start container:
vendor/bin/sail up -d - Run Migrations and Seeders:
vendor/bin/sail artisan migrate:fresh --seed - Publish API:
vendor/bin/sail artisan install:api
To getcorreclty formated JSON response including error messages, you must send Accept: application/json request header.
- Index: GET /api/activities
- Store: POST /api/activities
- Show: GET /api/activities/{activity}
- Update: PUT/PATCH /api/activities/{activity}
- Destroy: DELETE /api/activities/{activity}
Various unsorted experimental endpoints
- Get /api/experimental/whattimeisit
- Post: /api/experimental/in
- Get: /api/experimental/in - get local time
- Get /api/experimental/say/{message} -get time is specified location ˙with POST parameters continent and city ['continent' => 'Europe', 'city' => 'Berlin']
- Run tests
vendor/bin/sail artisan test