app->singleton(InsForgeClient::class, function (Application $app) { $config = $app->make('config')->get('insforge'); return new InsForgeClient( $config['base_url'], $config['api_key'], $config['timeout'], ); }); Auth::provider('insforge', fn () => new InsForgeUserProvider($this->app->make(InsForgeAuthService::class))); } /** * Bootstrap any application services. */ public function boot(): void { Gate::before(function (User $user, string $ability) { if ($user->isAdmin()) { return true; } return in_array($ability, self::ADMIN_ONLY_ABILITIES) ? false : null; }); } }