where('user_id', auth()->id()); } protected function getTableColumns(): array { return [ TextColumn::make('name') ->sortable() ->searchable(), TextColumn::make('public_key') ->tooltip('Copy') ->limit(20) ->copyable(), TextColumn::make('created_at') ->sortable(), ]; } public function table(Table $table): Table { return $table ->heading(null) ->query($this->getTableQuery()) ->columns($this->getTableColumns()) ->actions([ DeleteAction::make('delete') ->requiresConfirmation() ->authorize(fn (SshKey $record) => auth()->user()->can('delete', $record)) ->action(function (SshKey $record) { run_action($this, function () use ($record) { $record->delete(); $this->dispatch('$refresh'); }); }), ]); } }