mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 03:26:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			883 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			883 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Providers\Filament;
 | |
| 
 | |
| use Filament\Facades\Filament;
 | |
| use Filament\Navigation\MenuItem;
 | |
| use Filament\Panel;
 | |
| 
 | |
| class AppPanelProvider extends PanelProvider
 | |
| {
 | |
|     public function panel(Panel $panel): Panel
 | |
|     {
 | |
|         return parent::panel($panel)
 | |
|             ->id('app')
 | |
|             ->default()
 | |
|             ->breadcrumbs(false)
 | |
|             ->navigation(false)
 | |
|             ->userMenuItems([
 | |
|                 MenuItem::make()
 | |
|                     ->label(trans('profile.admin'))
 | |
|                     ->url(fn () => Filament::getPanel('admin')->getUrl())
 | |
|                     ->icon('tabler-arrow-forward')
 | |
|                     ->sort(5)
 | |
|                     ->visible(fn () => auth()->user()->canAccessPanel(Filament::getPanel('admin'))),
 | |
|             ])
 | |
|             ->discoverResources(in: app_path('Filament/App/Resources'), for: 'App\\Filament\\App\\Resources');
 | |
|     }
 | |
| }
 | 
