Database Seeding and Factories: Building Realistic Test Data in Laravel
Practical patterns for writing Laravel factories and seeders that produce data realistic enough to catch real bugs.
Software, AI, databases and the craft of building for the web — explained clearly, with code you can actually use.
Practical patterns for writing Laravel factories and seeders that produce data realistic enough to catch real bugs.
How to make POST endpoints safe to retry using idempotency keys, without duplicating orders, charges or emails.
A practical guide to transactions, SELECT FOR UPDATE and optimistic locking for data that must stay correct under concurrency.
A practical look at how the Laravel service container resolves classes, and when to reach for bindings instead of new.
How to structure global, group and route middleware in Laravel so cross-cutting logic stays out of your controllers.
A practical tour of typed class constants, property hooks, asymmetric visibility and other recent PHP features worth using in Laravel code.
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.