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`?
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?
Do you store Laravel global settings in the config files? Would you want them to be editable without touching the code? Let's build a Settings page where you can change things quickly.
Spatie Laravel MediaLibrary is a very popular package to store and associate images with models. But it has so many less-known features under the hood! Let's explore some of them.
We have all seen cases where our performance was slow due to a random N+1 query. How to detect them in a LIVE application, when it's already out? And, even better, how to automatically log such cases in a tool like Bugsnag? Let me show you.
This tutorial is a Part 2 follow-up to the "Livewire Sidebar Filters for E-Shop Products: Step-by-Step" article. We decided to improve that Sidebar Filter component with new features using Alpine.js.
Laravel Eloquent has many features but it's hard to fully understand them without real-world examples. In this short tutorial, we will show real examples of two methods `updateOrCreate()` and `firstOrCreate()`, taken from open-source projects.
When talking about validation, we mostly mean POST requests. But GET requests also need to be validated! In this tutorial, let's see how we can do it in a couple of different ways.
Have you ever needed a checkbox-based filter for a list, like in e-shop sidebars? In this tutorial, we will use Livewire to build this step-by-step and update the products list without page refresh.