components([ // ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('id')->sortable(), TextColumn::make('uid') ->formatStateUsing(fn ($state) => username_for_admin($state)) ->label(__('label.username')) , TextColumn::make('ip')->searchable(), TextColumn::make('country')->label(__('label.country'))->searchable(), TextColumn::make('city')->label(__('label.city'))->searchable(), TextColumn::make('client')->label(__('label.client')), TextColumn::make('created_at')->label(__('label.created_at')), ]) ->defaultSort('id', 'desc') ->filters([ Filter::make('uid') ->schema([ TextInput::make('uid') ->label(__('label.username')) ->placeholder('UID') , ])->query(function (Builder $query, array $data) { return $query->when($data['uid'], fn (Builder $query, $value) => $query->where("uid", $value)); }) , ]) ->recordActions([ // Tables\Actions\EditAction::make(), // Tables\Actions\DeleteAction::make(), ]) ->toolbarActions([ // Tables\Actions\DeleteBulkAction::make(), ]); } public static function getPages(): array { return [ 'index' => ManageLoginLogs::route('/'), ]; } }