Task: RESTful API for Project Management
Objective: Build a JSON API using Laravel to manage Projects and Tasks.
Requirements:
- Authentication: Use Sanctum to protect the API. Users can register and login to get a token.
- Relationships: A User has many Projects. A Project has many Tasks.
- CRUD: Endpoints to Create, Read, Update, and Delete Projects and Tasks.
- Authorization: Users can only view/edit their own projects (Policy).
- Validation: Use Form Requests for validation.
- Resources: Use API Resources to format the response.
Bonus Points:
- Implement a background job to send an email when a task is completed.
- Add filtering to the task list (e.g.,
?status=completed). - Write Feature tests for the endpoints.