API Authentication with Laravel Sanctum: Tokens, Abilities and SPA Auth
How Sanctum handles both SPA cookie authentication and mobile API tokens, and how to scope tokens with abilities instead of all-or-nothing access.
How Sanctum handles both SPA cookie authentication and mobile API tokens, and how to scope tokens with abilities instead of all-or-nothing access.
A practical guide to validating uploads, storing them safely, and generating resized image variants in a Laravel application.
Using events, listeners and model observers to move side effects like notifications and cache clearing out of controllers and into named classes.
Beyond basic Cache::remember calls: how to invalidate cached data correctly and avoid cache stampedes under load.
How to change a production schema without locking tables or breaking the currently deployed code, using an expand-and-contract approach.
An introduction to writing Laravel feature and unit tests with Pest, including datasets, expectations and what's actually worth testing.
A practical approach to API versioning in Laravel using resource classes, so you can evolve a response shape without breaking existing clients.
How to use relationships, local scopes and query builder macros to keep business logic out of controllers and in models where it belongs.
I write HorizonDesk: practical, no-hype articles on technology, money, business and the vehicles we drive. Everything here is something I’ve researched, tested or wanted explained clearly myself.