Skip to main content

"Back to School" Discount! Only until September 16th: 50% off Yearly/Lifetime membership!

Read more here

All Tutorials

In-depth Laravel tutorials covering advanced topics, real-world examples, and best practices.

Tutorial Free

Laravel Unique Validation for Multiple Columns

Laravel Validation already has a [Unique](https://laravel.com/docs/validation#rule-unique) rule to check if some record exists in the database. But what if you want a combination of TWO fields to be unique? Let me demonstrate.

Tutorial Free

Set Laravel User Locale in Middleware

To set the global Laravel language (locale), you need to use the `app()->setLocale()` method. But the question is: where to put this method if you want to set the locale based on a DB field like `users.language`?

Tutorial Free

How To Install Older Laravel Version

Sometimes, when starting a new Laravel project, you can't use the latest version. For example, when the PHP version on your server is lower than required by Laravel. What to do?