mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 10:06:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Providers\Filament;
 | 
						|
 | 
						|
use AchyutN\FilamentLogViewer\FilamentLogViewer;
 | 
						|
use Filament\Actions\Action;
 | 
						|
use Filament\Facades\Filament;
 | 
						|
use Filament\Panel;
 | 
						|
 | 
						|
class AppPanelProvider extends PanelProvider
 | 
						|
{
 | 
						|
    public function panel(Panel $panel): Panel
 | 
						|
    {
 | 
						|
        return parent::panel($panel)
 | 
						|
            ->id('app')
 | 
						|
            ->default()
 | 
						|
            ->breadcrumbs(false)
 | 
						|
            ->navigation(false)
 | 
						|
            ->topbar(true)
 | 
						|
            ->userMenuItems([
 | 
						|
                Action::make('to_admin')
 | 
						|
                    ->label(trans('profile.admin'))
 | 
						|
                    ->url(fn () => Filament::getPanel('admin')->getUrl())
 | 
						|
                    ->icon('tabler-arrow-forward')
 | 
						|
                    ->visible(fn () => user()?->canAccessPanel(Filament::getPanel('admin'))),
 | 
						|
            ])
 | 
						|
            ->discoverResources(in: app_path('Filament/App/Resources'), for: 'App\\Filament\\App\\Resources')
 | 
						|
            ->plugins([
 | 
						|
                FilamentLogViewer::make()
 | 
						|
                    ->authorize(false),
 | 
						|
            ]);
 | 
						|
    }
 | 
						|
}
 |