mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 07:46:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			866 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			866 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') ?? '',
 | |
|             ],
 | |
|             'usesSyncDriver' => config('queue.default') === 'sync',
 | |
|         ]);
 | |
|     }
 | |
| }
 | 
