mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 21:26:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace Pterodactyl\Http\ViewComposers;
 | |
| 
 | |
| use Illuminate\View\View;
 | |
| use Pterodactyl\Services\Helpers\AssetHashService;
 | |
| 
 | |
| class AssetComposer
 | |
| {
 | |
|     /**
 | |
|      * @var \Pterodactyl\Services\Helpers\AssetHashService
 | |
|      */
 | |
|     private $assetHashService;
 | |
| 
 | |
|     /**
 | |
|      * AssetComposer constructor.
 | |
|      */
 | |
|     public function __construct(AssetHashService $assetHashService)
 | |
|     {
 | |
|         $this->assetHashService = $assetHashService;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Provide access to the asset service in the views.
 | |
|      */
 | |
|     public function compose(View $view)
 | |
|     {
 | |
|         $view->with('asset', $this->assetHashService);
 | |
|         $view->with('siteConfiguration', [
 | |
|             'name' => config('app.name') ?? 'Pterodactyl',
 | |
|             'locale' => config('app.locale') ?? 'en',
 | |
|             'recaptcha' => [
 | |
|                 'enabled' => config('recaptcha.enabled', false),
 | |
|                 'siteKey' => config('recaptcha.website_key') ?? '',
 | |
|             ],
 | |
|             'analytics' => config('app.analytics') ?? '',
 | |
|         ]);
 | |
|     }
 | |
| }
 | 
