mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 19:14:45 +02:00
33 lines
798 B
PHP
33 lines
798 B
PHP
<?php
|
|
|
|
namespace App\Http\ViewComposers;
|
|
|
|
use Illuminate\View\View;
|
|
use App\Services\Helpers\AssetHashService;
|
|
|
|
class AssetComposer
|
|
{
|
|
/**
|
|
* AssetComposer constructor.
|
|
*/
|
|
public function __construct(private AssetHashService $assetHashService)
|
|
{
|
|
}
|
|
|
|
/**
|
|
* Provide access to the asset service in the views.
|
|
*/
|
|
public function compose(View $view): void
|
|
{
|
|
$view->with('asset', $this->assetHashService);
|
|
$view->with('siteConfiguration', [
|
|
'name' => config('app.name', 'Panel'),
|
|
'locale' => config('app.locale') ?? 'en',
|
|
'recaptcha' => [
|
|
'enabled' => config('recaptcha.enabled', false),
|
|
'siteKey' => config('recaptcha.website_key') ?? '',
|
|
],
|
|
]);
|
|
}
|
|
}
|