*/ protected $policies = [ // ]; /** * Register any authentication / authorization services. */ public function boot(): void { Gate::define('admin', function ($user) { return Auth::user()->role === 'admin'; }); Gate::define('customer', function ($user) { return Auth::user()->role === 'pelanggan'; }); } }