- GET
/
serves HTML page to render SPA - GET
/api/activities
returns list of activities with additional data - POST
/api/activities
saves new activity entity
API is covered with tests. Visit tests
folder for more details.
resources/js/app.js
defines alpine methods and properties to make our app interactiveresources/views/app.blade.php
has all the HTML for SPA. Under hood it usesBlade
template engine to split into components, which you can find incomponents
directory
This project has only 2 API routes, so I ended up using one controller class:
Which uses classes located under app/
folder.
Unlike other routes, APIs ones defined in the routes/api.php
file.
- Add browser tests for SPA part. Laravel Dusk can be used.
- Add pagination feature
- Laravel - PHP framework for web artisans
- Tailwind CSS - Utility-first CSS framework for rapid UI development.
- Alpine - Rugged, minimal framework for composing JavaScript behavior in your markup.