query( DisciplinaryReport::query() ->with(['employee', 'creator']) ->latest('report_date') ->limit(5), ) ->columns([ TextColumn::make('employee.full_name') ->label(__('hr.fields.employee')), TextColumn::make('report_date') ->date(), TextColumn::make('title') ->limit(40), TextColumn::make('severity') ->badge() ->color(fn (DisciplinarySeverity $state): string => $state->color()) ->formatStateUsing(fn (DisciplinarySeverity $state): string => $state->label()), TextColumn::make('creator.name') ->label(__('hr.fields.created_by')), ]) ->paginated(false); } /** * @return Builder|null */ protected function getTableQuery(): ?Builder { return null; } }