09 May, 2020
I was invited to talk about Laravel API development and scaling on Muhammad Sumon Molla Selim's weekly web podcast Klassroom presents the Techtalk. We talked about a bunch of different things about API development for about 2 hours.
Here are the gist of my talk and various references on how to build and maintain a suntainable API in Laravel.
$hidden attribute. It also protect us from mass assignment.created_at, updated_at timestamp, and it's very easy to add created_by, updated_by to your model.league/fractal, or it's laravel bridge spatie/laravel-fractal for ease of use.uuid. You could use ramsey/uuid.barryvdh/laravel-debugbar.spatie/laravel-query-builder for that. You could also enable sorting feature by using spatie/eloquent-sortable package.ETag header, and handle If-None-Match header in the request. Laravel also provide a cache.headers middleware out of the box, you can use that to handle api caching too.config/app.php file.spatie/laravel-translatable package.HATEOAS (Hypermedia as the Engine of Application State).json:api, you could use cloudcreativity/laravel-json-api, cloudcreativity/json-api-testing and spatie/laravel-json-api-paginate to easily achieve that. Column filter and compound documents implies almost the same features as GraphQL.Enjoy!!