app->scoped(StoicSettings::class); } public function boot(): void { Telemetry::optOut(); // header.blade.php's category dropdown — root collections only, resolved // per-request so the composer runs after `locale` middleware has already // set App::getLocale(), which CollectionService's name resolution depends on. View::composer('components.header', function (ViewInstance $view) { $view->with('categories', app(CollectionService::class)->list( filters: new CollectionFilters(rootOnly: true), perPage: 100, sort: CollectionSort::Position, )->items()); }); // Site-wide settings edited in Stoic (settings.md): default meta // description, social links for the footer, emails and schema.org. View::composer( ['layouts.app', 'components.footer', 'emails.layout', 'home'], fn (ViewInstance $view) => $view->with('stoicSettings', app(StoicSettings::class)), ); if ($this->app->environment('production')) { URL::forceScheme('https'); } $this->app->booted(function () { ModelManifest::replace( \Lunar\Models\Contracts\Customer::class, Customer::class, ); $this->app['config']->set( 'auth.providers.staff.model', Staff::class, ); Relation::morphMap([ 'staff' => \Lunar\Admin\Models\Staff::class, ]); }); } }