Laravel: Encrypt Models Data with Casts
If you want to avoid storing sensitive DB data (like passport numbers) as plain text, Laravel can encrypt it in Eloquent Models by simply casting it as `encrypted`. Let's see how it works.
In-depth Laravel tutorials covering advanced topics, real-world examples, and best practices.
If you want to avoid storing sensitive DB data (like passport numbers) as plain text, Laravel can encrypt it in Eloquent Models by simply casting it as `encrypted`. Let's see how it works.
When displaying menu items in the navigation bar, it's important to highlight the current active page visually. Let's see a few ways to do this in Laravel.
If you try to use Livewire 3 with the Laravel Breeze starter kit, you may notice that your components are not reactive, and some Livewire features just don't work. The reason may be Alpine.js, which is loaded twice. Let me show you how to fix it.
Filament 3 has a multi-tenancy feature. In this tutorial, let's make a validation rule with a unique field value for the current tenant. As with everything with Laravel, there is more than one way to do it, so we will see how to achieve it in three ways.
Sometimes, you may need to make a copy of an Eloquent Model object to clone it. For example, you have similar products; the only difference is the specific options inside. I will show you two ways.
In Filament, you can attach/detach a relationship with the Relation Manager. But what if you want to refresh the main form after creating/editing/deleting a record in the Relation Manager? Let me show you how to do it.
In Filament, adding a filter to dashboard widgets is pretty straightforward. But what if you want to have a filter that would update MULTIPLE widgets at once, similar to Google Analytics? We need to use events and Livewire properties for this. Let's take a look.
Filament 3 has authentication features that you can easily enable, like the Profile page. But its default design is the same as the login/register page. What if we want to use the full-page design, with menus, for the Edit Profile page, too? Let's see how to do it.
Filament is great for creating full CRUDs in Resources. But what if you want to create just a single Edit form for one specific record, without the full Resource? Let's use a Custom Page for it.
Sometimes your Filament panel will not have a dashboard and will redirect your user to a specific page after logging in. But how is that done? Do you have to build a custom login page? No! There's a much easier way.