Latest Premium Tutorial
-
· 5 mins, 969 words · premium
Filament Render Hooks: 4 Practical Examples
Filament has a powerful feature called Render hooks to render Blade content in various places and is especially useful for plugin developers. In this article, we will show you four practical examples of this.
Newest content
-
· 2 mins, 377 words
Filament: Add Custom Button to Form - Reset Example to Clear Fields
-
· 7 mins, 1351 words · premium
Laravel and Vue.js: Pagination and Infinite Scroll Examples
-
Random Quick Laravel Tip:
Override Permissions for Super AdminIf you've defined your Gates but want to override all permissions for SUPER ADMIN user, to give that superadmin ALL permissions, you can intercept gates with
Gate::before()
statement, inAuthServiceProvider.php
file.// Intercept any Gate and check if it's super adminGate::before(function($user, $ability) {if ($user->is_super_admin == 1) {return true;}});// Or if you use some permissions package...Gate::before(function($user, $ability) {if ($user->hasPermission('root')) {return true;}});If you want to do something in your Gate when there is no user at all, you need to add a type hint for
$user
allowing it to benull
. For example, if you have a role called Anonymous for your non-logged-in users:Gate::before(function (?User $user, $ability) {if ($user === null) {$role = Role::findByName('Anonymous');return $role->hasPermissionTo($ability) ? true : null;}return $user->hasRole('Super Admin') ? true : null;}); -
· 4 mins, 603 words
Laravel and Vue.js: Datatables.net with Vue 3 and Inertia
-
· 3 mins, 501 words
Laravel and Vue.js: How to Display Validation Errors
-
· 4 mins, 649 words
Laravel and Vue.js Translations with i18n Plugin
-
Premium Course: [NEW] Laravel Web to Mobile API: Reuse Old Code with Services
-
· 1 min, 190 words
Filament Date Picker: Disable Dates with Conditions
-
· 2 mins, 397 words
How to Add Vue.js 3 into Laravel 10 with Vite: Quick Tutorial
-
· 5 mins, 980 words
Laravel and DomPDF: Generate Simple Invoice PDF with Images and CSS
-
· 10 mins, 1937 words · premium
Laravel Invoices: Auto-Generate Serial Numbers - 4 Different Ways
-
· 4 mins, 663 words
Filament: Stats Widgets Above Table - Auto-Update with Filters