where('type', 'exception'); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('message') ->state(function (DebugLog $record) { return $record->context['message'] ?? null; }) ->toggleable(), Tables\Columns\TextColumn::make('file') ->state(function (DebugLog $record) { return $record->context['file'] ?? null; }) ->toggleable(), Tables\Columns\TextColumn::make('line') ->state(function (DebugLog $record) { return $record->context['line'] ?? null; }) ->toggleable(), Tables\Columns\TextColumn::make('created_at') ->searchable() ->toggleable(isToggledHiddenByDefault: true) ->sortable(), ]) ->actions([ Tables\Actions\ViewAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]) ->defaultSort('created_at', 'desc'); } public static function shouldRegisterNavigation(): bool { return config('settings.debug', false); } public static function infolist(Infolist $infolist): Infolist { return $infolist ->columns(1) ->schema([ Infolists\Components\TextEntry::make('message') ->state(function (DebugLog $record) { return $record->context['message'] ?? null; }), Infolists\Components\TextEntry::make('file') ->state(function (DebugLog $record) { return $record->context['file'] ?? null; }), Infolists\Components\TextEntry::make('line') ->state(function (DebugLog $record) { return $record->context['line'] ?? null; }), Infolists\Components\TextEntry::make('trace') ->label('Trace') ->state(function (DebugLog $record) { return $record->context['trace'] ?? null; }), ]); } public static function getPages(): array { return [ 'index' => Pages\ListErrorLogs::route('/'), ]; } }