Filament Global Search "In-Place" Actions: Approve and Copy to Clipboard
Filament 4/5You 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.
Get the Source Code:
Only This Example
One-time payment
Sign in with GitHub to buy
Sign in first, then complete your $9 checkout.
FilamentExamples Membership
30-day money-back guarantee
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...