Blogs Book Talks Contact Resume
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.
$hiddenattribute. It also protect us from mass assignment.
updated_attimestamp, and it's very easy to add
updated_byto your model.
league/fractal, or it's laravel bridge
spatie/laravel-fractalfor ease of use.
uuid. You could use
spatie/laravel-query-builderfor that. You could also enable sorting feature by using
ETagheader, and handle
If-None-Matchheader in the request. Laravel also provide a
cache.headersmiddleware out of the box, you can use that to handle api caching too.
HATEOAS(Hypermedia as the Engine of Application State).
json:api, you could use
spatie/laravel-json-api-paginateto easily achieve that. Column filter and compound documents implies almost the same features as GraphQL.