- Run composer install
- Make sure that the variables DB_HOST, DB_USERNAME and DB_PASSWORD have the correct values for your database connection in the .evn file
- Run php artisan migrate
The API can be used by calling the endpoints:
- GET register - Allows users to register
- GET login - Allows users to login
- GET media - Lists all Media titles
- POST media - Creates a media title
- PATCH media - Updates an existing media title
- DELETE media - Deletes an existing media title
There's also feature ad unit tests that can be run by executing:
./vendor/bin/phpunit
Apologies for not completing the task but I kept track of the time spent writing this.
The only thing missing is the user groups implementation and allowing/restricting access to the endpoints based on the user associated role. This could be done by extending the User model to include a role column and restrict this access on a middleware class that could easily be configured on the routes.