with('asset', $this->assetHashService); // Rendered lazily by the layout; resolving the tags never throws. $view->with('extensionHead', $this->extensionHeadTags); $view->with('siteConfiguration', [ 'name' => config('app.name', 'Pterodactyl'), 'locale' => config('app.locale', 'en'), 'recaptcha' => [ 'enabled' => config('recaptcha.enabled', false), 'siteKey' => config('recaptcha.website_key', ''), ], 'extensions' => $this->extensionPayload(), ]); } /** * The enabled frontend extensions the SPA boot loader should import, with their * frontend settings for signed-in users and only the public ones for guests. * Never allowed to break page rendering - worst case the SPA sees no extensions. * * @return array */ private function extensionPayload(): array { if (! config('extensions.enabled')) { return []; } try { return $this->extensionManager->frontendPayload(authenticated: Auth::check()); } catch (Throwable) { return []; } } }