22 lines
443 B
PHP
Executable File
22 lines
443 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Support\Facades\Gate;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
// 🔥 Super Admin ignora todas as permissões
|
|
Gate::before(function ($user, $ability) {
|
|
return $user->is_super_admin ? true : null;
|
|
});
|
|
}
|
|
} |