2018-03-31 20:52:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\ViewComposers;
|
|
|
|
|
|
|
|
use Illuminate\View\View;
|
|
|
|
use Pterodactyl\Services\Helpers\AssetHashService;
|
|
|
|
|
|
|
|
class AssetComposer
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* AssetComposer constructor.
|
|
|
|
*/
|
2022-10-14 16:59:20 +00:00
|
|
|
public function __construct(private AssetHashService $assetHashService)
|
2018-03-31 20:52:11 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provide access to the asset service in the views.
|
|
|
|
*/
|
2022-10-14 16:59:20 +00:00
|
|
|
public function compose(View $view): void
|
2018-03-31 20:52:11 +00:00
|
|
|
{
|
|
|
|
$view->with('asset', $this->assetHashService);
|
2019-12-16 02:05:44 +00:00
|
|
|
$view->with('siteConfiguration', [
|
|
|
|
'name' => config('app.name') ?? 'Pterodactyl',
|
|
|
|
'locale' => config('app.locale') ?? 'en',
|
|
|
|
'recaptcha' => [
|
|
|
|
'enabled' => config('recaptcha.enabled', false),
|
|
|
|
'siteKey' => config('recaptcha.website_key') ?? '',
|
|
|
|
],
|
|
|
|
]);
|
2018-03-31 20:52:11 +00:00
|
|
|
}
|
|
|
|
}
|