app->singleton(ThemeRegistry::class); $this->app->singleton(SectionRegistry::class); // Outside web requests (console, tests, mails) the default site's theme is used. $this->app->singleton(Theme::class, fn ($app): Theme => $app->make(ThemeFactory::class) ->forSite($app->make(ThemeFactory::class)->site()) ->activate()); } }