Articles

Showing 10 posts
September 12th, 2024

How to Alias Middleware in Laravel 11

Since Laravel 11 removes the Kernel class, how do we alias middleware? Let's take a look.

Author
Alex Garrett-Smith
Laravel
September 11th, 2024

Using Cloudflare Turnstile with Livewire

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!

Author
Alex Garrett-Smith
Livewire
Laravel
July 19th, 2024

Logging Users Out of Other Browser Sessions with Laravel

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.

Author
Alex Garrett-Smith
Laravel
July 18th, 2024

Match Wildcard Routes in Laravel

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.

Author
Alex Garrett-Smith
Laravel
July 17th, 2024

Easily Add Breadcrumbs to your Laravel Websites

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.

Author
Alex Garrett-Smith
Laravel
July 15th, 2024

How to get the next and previous records in Laravel

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.

Author
Alex Garrett-Smith
Eloquent
Laravel
July 12th, 2024

How to fix toOthers when broadcasting with a Laravel API request

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.

Author
Alex Garrett-Smith
Laravel
July 11th, 2024

How to Use orderBy() (and more) for Sorting Eloquent Query Results

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!

Author
Alex Garrett-Smith
Eloquent
Laravel
July 10th, 2024

Deploying Reverb on Laravel Forge

This guide covers every step you need to take to get Reverb up and running in production using Laravel Forge.

Author
Alex Garrett-Smith
Laravel
Server
July 10th, 2024

Seed Laravel factory data with an incrementing date

I often find myself seeding huge lists of data in Laravel that need to be ordered. Using sequences in factories, we can create a more realistic list of data by incrementing the created_at date.

Author
Alex Garrett-Smith
Laravel

Tags