Skip to main content

Introduction

Actions are interactive UI components that handle user workflows in your Filament application. Unlike traditional PHP action classes that only handle business logic, Filament actions combine UI elements (buttons, modals, forms) with the logic that executes when users interact with them. For example, you might have a button to delete a client record that opens a confirmation modal. When the user confirms, the client is deleted. This entire workflow is an action:

How actions work

Actions are built using a fluent API that allows you to configure every aspect of the user experience:

Simple URL-based actions

The simplest actions redirect users to a URL when clicked:

Actions with modals

Actions can open modals to collect additional information before executing:

Actions with confirmation

For destructive operations, you can require user confirmation:

Customizing the trigger button

Authorization

You can conditionally show or hide actions based on user permissions:

Using policies

Actions can automatically check Laravel policies:
If the policy returns a response message, you can show it as a tooltip:
Or display it as a notification when clicked:

Utility injection

Most action methods accept closures that can have utilities injected as parameters:
Available utilities include $record, $data, $arguments, $livewire, $action, and more. The specific parameter names must be used for injection to work.

Additional features

Keyboard shortcuts

Bind keyboard shortcuts to your actions:

Badges

Add a badge to the corner of a button:

Rate limiting

Prevent abuse by rate limiting actions:

Extra attributes

Add custom HTML attributes:

Next steps