Filament Global Search "In-Place" Actions: Approve and Copy to Clipboard

Filament 4

You can return Global Search results with links inside of the result to perform the action in the result block, without navigating to any other page.

filament-global-search-action-clipboard

Get the Source Code:

How it works

Filament's global search lets users find records from anywhere in the admin panel. But did you know you can attach action buttons to search results?


Example 1: Approve a User via Livewire Event

Sometimes you want to perform a server-side action directly from a search result — like approving a user by setting their email_verified_at timestamp. Since global search actions can't run PHP closures directly, we dispatch a Livewire event to a dedicated component that handles the logic.

Step 1: Enable Global Search on Your Resource

Override getGloballySearchableAttributes() in your UserResource:

protected static ?string $recordTitleAttribute = 'name';
 
public static function getGloballySearchableAttributes(): array
{
return ['name', 'email'];
}

Step 2: Add the Approve Action

Use dispatchTo() to target a specific...

The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 155 Premium Examples for $99