© 2026 Hedgehog Software, LLC
'auth' => [ Authenticate::class, UserMenuItemMiddleware::class,
php artisan make:middleware UserMenuItemMiddleware
public function handle(Request $request, Closure $next): Response { if (Auth::user()->hasRole('Root')) { Filament::serving(function () { Filament::registerUserMenuItems([ 'GitLog' => UserMenuItem::make() ->label('Git Log') ->url(route('filament.pages.settings')) ->icon('heroicon-s-cog'), ]); }); }
class GitLog extends Page { protected static ?string $title = 'Git Log'; protected static ?string $navigationLabel = 'Git Log'; protected static ?string $navigationIcon = 'heroicon-o-document-text'; //protected static ?string $navigationGroup = 'Settings'; //protected static ?string $navigationIcon = 'heroicon-o-beaker'; protected static string $view = 'filament.pages.git-log'; protected static ?int $navigationSort = 4; public $content; public function mount(): void { //abort_unless(auth()->user()->hasRole(['Root', 'Admin']), 403); abort_unless(auth()->user()->hasRole(['Root']), 403); $this->content = file_get_contents(base_path('git-log.txt')); } }