configureDefaults(); Gate::define('manage-bonuses', function (User $user) { // Allowing all authenticated users for now while you are setting it up. // You should restrict this later! return true; }); Gate::define('manage-users', function (User $user) { // Temporarily allowing all authenticated users while testing. // You should restrict this later by returning $user->isAdmin(); return true; }); } /** * Configure default behaviors for production-ready applications. */ protected function configureDefaults(): void { Date::use(CarbonImmutable::class); DB::prohibitDestructiveCommands( app()->isProduction(), ); Password::defaults(fn (): ?Password => app()->isProduction() ? Password::min(12) ->mixedCase() ->letters() ->numbers() ->symbols() ->uncompromised() : null, ); } }