Filament: Globally Change Edit Action to Icon (But Only for Tables)

2025-10-21 Filament v4

What if you want in your Filament tables to show edit action only as an icon? Let's see how to do that.


Option 1

You can configure globally the edit action in the Service Provider.

app\Providers\AppServiceProvider.php:

use Filament\Actions\EditAction;
use Illuminate\Support\ServiceProvider;
 
class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
EditAction::configureUsing(function (EditAction $action) {
$action->iconButton();
});
}
}

However, with this approach, the edit action is modified globally, which means that on every page where it is used, these options will be applied. Which, depending on the configuration, might not be what you want. For example, in this case, the button is not visible on the view page.


Option 2

A better approach would be to create a custom action that would be used only on the table. There's no Artisan command to create an action, so you need to create it manually. This custom action class must extend the original Filament edit action.

App\Filament\Actions\TableEditAction.php:

use Filament\Actions\EditAction;
 
class TableEditAction extends EditAction
{
protected function setUp(): void
{
parent::setUp();
 
$this->iconButton();
}
}

Now, in your table, instead of the EditAction, you will call this TableEditAction.

use App\Filament\Actions\TableEditAction;
 
class UsersTable
{
public static function configure(Table $table): Table
{
return $table
// ...
->recordActions([
ViewAction::make(),
EditAction::make(),
TableEditAction::make(),
])
// ...
}
}

In the table, we can see the edit action only with an icon:

And in the view page, the edit action isn't touched:

This tutorial's code comes from our Project Example LMS: Learning Management System

A few of our Premium Examples: