it is possible to adjust the position of a column heading

I would like to be able to move the 'ativar/desativar' column in this filament table, is that possible? taking advantage, is it possible to also name the action columns? in this image I have a delete action, which is the trash, and an edit action, which is the pencil <code> protected function getTableColumns(): array { return [ TextColumn::make('name') ->searchable() ->label(trans('admin::user.column_name')), TextColumn::make('email') ->searchable() ->label(trans('admin::user.column_email')), TextColumn::make('roles.name') ->searchable() ->sortable() ->label(trans('Função')), TextColumn::make('creator') ->formatStateUsing(function ($record) { $user = Business::current() ->users() ->find($record->id)?->pivot?->actor?->name; return $user; }) ->searchable() ->sortable() ->label(trans('Criador')), ToggleColumn::make('active') ->label(trans('Ativar/Desativar')),

]; } protected function getTableActions(): array { return [ EditAction::make() ->iconButton() ->action(fn($record) => $this->redirect(route('user.edit', $record->id))),
Action::make('Delete') ->requiresConfirmation() ->iconButton() ->icon('heroicon-o-trash') ->form([ TextInput::make('password') ->password()
]) ->action(function ($record) { $record->delete();
}) // ->modalDescription(fn ($record) => 'Usuário removido: ' . $record->name) ]; } </code>
2 Replies
Patrick Boivin
Patrick Boivin16mo ago
I don't understand the question, where do you want to move the column?
Dennis Koch
Dennis Koch16mo ago
Also please use #✅┊rules on how to format code
Want results from more Discord servers?
Add your server