Both GUI and API implemented for CRUD of Domain records.
app/Models/Domain.php
- Domain record modelapp/Http/Controllers/DomainController.php
- Controller for the UI portionapp/Http/Resources/Domain[Collection]Resource.php
- Resources for REST API implementationapp/Jobs/Domain[Create|Update]Job.php
- Jobs for Create and Update so we can queue actions that may take a whiledatabase/migrations/*create_[domains|jobs]_table.php
- Migration table creation for domains and jobsresources/views/Layouts/App.blade.php
- Base UI template for all viewsresources/views/Domains/*.blade.php
- Specific views for different CRUD actions over UIroutes/web.php
- Add Resource route for UI implementationroutes/api.php
- Add routes for REST API implementationtests/Feature/*
- Integration tests
curl -H "Accept: application/json" http://localhost/api/domains | jq -r .
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"domainName":"example.com","deliveredCount":0,"bouncedCount":0}' http://localhost/api/domains
curl -H "Accept: application/json" http://localhost/api/domains/1 | jq -r .
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{"bouncedCount":1}' http://localhost/api/domains/1
curl -X DELETE -H "Accept: application/json" http://localhost/api/domains/1