clevyr/nova-action-button
A Laravel Nova package that adds customizable action buttons to your resources, letting you trigger actions directly from index and detail views with minimal setup. Quickly wire buttons to routes, actions, or custom callbacks for smoother admin workflows.
clevyr/nova-action-button promotes Nova actions out of the "Run Action" dropdown and renders them as first-class buttons on a resource's detail (and index) pages — useful for the one or two actions that are part of the normal day-to-day workflow (Approve, Publish, Re-send invite) rather than occasional bulk operations.
composer require clevyr/nova-action-button
No service provider registration or config publishing is normally required — the package ships a precompiled Nova field component and registers its assets through Nova's Nova::script()/Nova::style() bootstrapping. After install, run php artisan nova:asset / a hard refresh if the button does not render.
Where to look first: the package's src/ for the button field class (the make()->action() builder) and the README's example block — that example is the whole API surface in practice. If anything is unclear, read the compiled Vue component's props; they mirror the PHP fluent methods.
First use case: take an existing ApprovePost action that today lives in the dropdown, and drop it on the Post detail page as a button with a confirmation modal. Zero changes to the action class itself — the package reuses Nova's action execution endpoint.
Reuse your existing Action classes. The main win is that the button is a renderer, not a new action system. The action's handle(), fields(), and authorization are all still Nova's, so a button and a dropdown entry can coexist and stay in sync.
use Clevyr\NovaActionButton\NovaActionButton;
public function fields(Request $request)
{
return [
// ...normal fields
NovaActionButton::make('Approve')
->action(ApprovePost::class),
];
}
Confirmation is the policy decision, not a UI detail. Let the button inherit the action's own confirmation config rather than duplicating confirmText/confirmButtonText in two places. Destructive actions (delete, refund, revoke) should keep the confirmation; idempotent ones (publish, sync, re-index) are good candidates for withoutConfirmation() on the action class so the button fires immediately.
Gate with Nova, not with if in the fields array. canSee() on the button and the action's authorizedToSee() should agree — but prefer putting the gate on the action/policy so the same rule applies whether the user clicks the button or the dropdown item.
Inline actions vs. class actions. For one-off buttons, Nova's inline Action::make()->action(fn ...) pattern works and keeps the logic next to the field definition. For anything reused across resources, define the action class — that is what makes the button worth having.
Testing: assert the button's visibility with Nova's field assertions, and exercise the underlying action through Nova's action endpoint test helpers rather than trying to simulate the Vue component. The button adds no server-side behaviour of its own, so action tests cover it.
withoutConfirmation(). In v2.0.1 and earlier the button ignored the setting on the action and always showed the confirm modal, so "one-click" actions silently weren't. This is a bugfix only — no breaking changes, no migration steps, safe upgrade from 2.0.x.authorizedToSee() or a missing $this->resource context on an index page — not the package.php artisan view:clear and hard-reload; a stale compiled asset is the usual cause of "I upgraded but nothing changed".How can I help you explore Laravel packages today?