Laravel recently introduced a new defer helper function, allowing you to defer the execution of a closure until a response is sent to the user — helping make these responses feel much faster. Let's dive into how it works.
There are several ways to get the row count from your database with Eloquent in Laravel. Let's cover the basics and then look at a much better solution when counting on related models — using aggregates at the database level.
Since Laravel 11 removes the Kernel class, how do we alias middleware? Let's take a look.
Setting up, configuring and validating a Cloudflare Turnstile challenge with Livewire is simple, thanks to the Laravel-cloudflare-turnstile package. Let's look at how to set it up!
Laravel provides a method for logging users out of all other browser sessions by re-hashing passwords. Let's look at how to use it to invalidate all other browser sessions for your users.
Here's a quick tip on matching wildcard routes in Laravel. Once you're done, you can access the wildcard value and do anything you need to do with it.
Adding breadcrumbs to your Laravel sites has quite a few benefits. Let's look at the easiest way to add breadcrumbs in Laravel, and a few tips on customising them.
Laravel doesn't have built-in support to fetch next and previous records, but adding a couple of helper methods to your model does the trick.
The toOthers method won't work correctly if you're triggering a broadcast via an API request to your Laravel application. Here's why and how to fix it.
Ordering in Laravel is pretty straightforward, but you can use a few other techniques to make the most of Eloquent's ordering abilities. Let's cover everything you should know about ordering queries with Laravel!