Nova Row Actions
displays ordinary Laravel Nova actions as visible, accessible buttons in resource index rows. It uses Nova's standard action endpoint, authorization, confirmation forms, response handling, and table refresh flow.
Requirements
- PHP 8.1+
- Laravel 10.48+, 11.44+, 12.1+, or 13
- Laravel Nova 5.8.3+
Installation
Install the package with Composer. Laravel package discovery registers its service provider and compiled Nova assets automatically.
composer require meghdadfadaee/nova-row-actions
Usage
Add the field to a Nova resource and keep each represented action registered
in the resource's actions() method. The latter is required because Nova's
standard action endpoint only executes actions registered by the resource.
use Illuminate\Database\Eloquent\Model;
use MeghdadFadaee\NovaRowActions\RowActions;
public function fields(NovaRequest $request): array
{
return [
RowActions::make('Actions')
->add(
Approve::make(),
icon: 'check',
color: 'success',
activeWhen: fn (Model $model) => $model->approved,
disabledWhen: fn (Model $model) => $model->approved,
confirm: false,
)
->add(
Reject::make(),
icon: 'x-mark',
color: 'danger',
tooltip: 'Reject this record',
visibleWhen: fn (Model $model) => ! $model->archived,
order: 20,
confirm: true,
),
];
}
public function actions(NovaRequest $request): array
{
return [
Approve::make()->exceptInline(),
Reject::make()->exceptInline(),
];
}
exceptInline() leaves actions available in Nova's bulk selector and detail
view while removing them from the row ellipsis.
Button options
add() accepts the following named arguments:
icon: a Nova icon name, such ascheckorx-mark.color:default,primary,success,danger,warning, orinfo.variant:outline,solid, orghost.label: button/accessibility label; defaults to the action name.tooltip: tooltip text; defaults to the resolved label.activeWhen: boolean or row callback controlling the pressed/active state.disabledWhen: boolean or row callback controlling disabled state.visibleWhen: boolean or row callback controlling server-side visibility.order: numeric order; insertion order is used by default.confirm:trueto force confirmation,falseto skip it, ornullto preserve the Nova action's own confirmation strategy.showLabel: display text beside the icon; labels remain available to screen readers when this is false.
Callbacks receive (Model $model, NovaRequest $request, Action $action) and may
declare only the leading arguments they need.
Notes and limitations
- Actions must be normal resource actions registered by
actions(). Pivot-only actions and lens-specific endpoints are not supported by the field. - Relationship indexes are supported through Nova's
viaResource,viaResourceId, andviaRelationshipaction parameters. - Nova action fields, validation errors, downloads, events, response modals, redirects, visits, danger messages, notifications, and progress state are delegated to Nova 5.8.3's native action composable.
- The package ships compiled production assets; Node is only needed when modifying the Vue or CSS sources.
Development
npm ci
npm test
npm run production
composer validate --strict