mirror of
https://github.com/pelican-dev/panel.git
synced 2025-10-29 18:06:52 +01:00
33 lines
1019 B
PHP
33 lines
1019 B
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)
|
|
->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),
|
|
]);
|
|
}
|
|
}
|