mirror of
https://github.com/pelican-dev/panel.git
synced 2025-09-08 09:48:36 +02:00
28 lines
856 B
PHP
28 lines
856 B
PHP
<?php
|
|
|
|
namespace App\Providers\Filament;
|
|
|
|
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 () => auth()->user()->canAccessPanel(Filament::getPanel('admin'))),
|
|
])
|
|
->discoverResources(in: app_path('Filament/App/Resources'), for: 'App\\Filament\\App\\Resources');
|
|
}
|
|
}
|