JoanFo e99f7179c6
Topbar removed if using sidebar (#1789)
Co-authored-by: Boy132 <mail@boy132.de>
2025-10-10 16:37:14 -04:00

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),
]);
}
}