Posts About Laravel
Laravel is a powerful PHP framework that simplifies web development with its elegant syntax and comprehensive toolkit. It streamlines tasks like routing, authentication, and caching, making it ideal for both simple and complex applications.
Fixing 'Duplicate entry for key failed_jobs_uuid_unique'
You spot this in your logs and it looks alarming. It reads like a database problem, but it is really a symptom of a queue misconfiguration. On...
Properties of a Scheduled Task in Laravel
Every entry you add to the scheduler becomes a task object carrying a full set of properties: what to run, when, in which timezone, under what...
Multi-Tenancy in Laravel: The Decisions and Gotchas Before You Build
A multi tenant application serves many separate customers from one codebase, while keeping each customer's data walled off from the rest. A sm...
Paginating a Custom Collection or Raw Query in Laravel
Eloquent paginates for free with ->paginate(). But sometimes your data does not come from Eloquent. It might be the result of a complex raw...
Managing Your Assets with Vite in Laravel
If you used Laravel a few years ago you bundled assets with Laravel Mix, a friendly wrapper over Webpack. Laravel has moved on. New apps ship...
An Introduction to the Laravel Eloquent ORM
Eloquent is Laravel's ORM, which stands for object relational mapper. It follows the active record pattern, where each database table has a ma...
Fair Queues: Balancing Job Processing Across Tenants in Laravel
Picture a multi tenant app with one shared queue. Most of the time it hums along. Then one tenant kicks off a bulk import and dispatches forty...
Laravel Vapor: When to Use a Load Balancer
Something has to receive a web request from the internet and hand it to your HTTP lambda. Vapor gives you two choices for that front door, and...
Laravel Queue Workers: How They Work
A queue worker sounds mysterious until you see what it actually is: a plain PHP process running in the background, pulling jobs out of storage...
Laravel Queues and Deployments
A queue worker is a long lived process that booted your application once and keeps it in memory. That is what makes it fast, and it is also wh...
Building and Running a Scheduled Task in Laravel
You schedule a task with a tidy one liner, but it helps to know what Laravel actually does when that task is due. When the scheduler decides a...
Building a Weekly Cohort Retention Curve in Laravel
A reader asked me to help build a retention curve from their database. Their site had a multi step signup, and they wanted to see how far each...
Introduction to Exception Handling in Laravel
Every Laravel application sits inside a big try and catch that you never wrote. When a request comes in and your code throws an exception that...
Building a Live Search with Autocomplete in Laravel
A search box that suggests results as you type makes a site feel quick and helpful. The shape is always the same: a Laravel endpoint that retu...
String Manipulation Commands in Redis
A Redis string is not just a place to dump a single value. You can treat it like a buffer and work on parts of it, which opens up a neat trick...
What Is AWS Lambda, and How Laravel Vapor Uses It
Laravel Vapor is a serverless deployment platform for Laravel, powered by AWS Lambda. The clever engineering is in how Vapor maps a normal Lar...
Why Your Laravel Queue Workers Are Not Restarting
Restarting workers belongs in every deploy script, because workers run the code they booted with. The command is simple. But sometimes you run...
Creating Custom Blade Directives in Laravel
When you find the same chunk of logic creeping into your Blade templates, an if block repeated across many views, it is a sign to wrap it in a...
Designing Reliable Queued Jobs: Make Them Self-Contained
A queued job is not normal code. It gets serialized, stored, shipped to another process, unserialized, and only then run, perhaps instantly, p...
Task Scheduling in Laravel: Cron Jobs the Clean Way
Every app eventually needs to do something on a timer: send reminder emails, clean up old rows, generate a nightly report. The old way was to...