Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nova Action Button Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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.

Implementation Patterns

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.

Gotchas and Tips

  • v2.0.2 is the release to be on if you use 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.
  • The request still goes through Nova's action endpoint. If an action works in the dropdown but 403s from the button, the cause is almost always authorizedToSee() or a missing $this->resource context on an index page — not the package.
  • Index-page buttons need row context. Buttons attached to a resource index act on the resource under the button; verify with a two-row test that the right model is hit, since a misconfigured field can make it look like the button works when it is operating on the wrong record.
  • Asset caching bites. The Vue component is precompiled. After a composer update, run php artisan view:clear and hard-reload; a stale compiled asset is the usual cause of "I upgraded but nothing changed".
  • Don't stack many buttons. Two or three inline buttons is the sweet spot. Beyond that the detail page becomes a toolbar and users stop reading the labels — go back to the dropdown for the long tail.
  • Extension point: the PHP field class is thin; behavioural tweaks (labels, modal copy, styling) belong in the fluent methods, and the Vue component can be swapped if you need a genuinely different rendering. Forking the component should be a last resort, because it means re-syncing on every release.
  • Watch the Nova major version constraint. This package tracks Nova 4's asset and field APIs; pinning an older Nova while pulling a newer button release is a common source of a blank button with console errors.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels