app->singleton(SettingsService::class); } public function boot(): void { // Settings nur laden wenn die Tabelle existiert (z.B. vor Migration schützen) if (!$this->app->runningInConsole() && Schema::hasTable('settings')) { $settings = $this->app->make(SettingsService::class)->all(); View::share('appSettings', $settings); } else { View::share('appSettings', [ 'site_name' => config('app.name'), 'site_logo' => '', 'button_color' => '#4f46e5', 'theme_mode' => 'light', ]); } } }