PHPackages                             pavloniym/nova-action-buttons - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pavloniym/nova-action-buttons

ActiveLibrary

pavloniym/nova-action-buttons
=============================

A Laravel Nova field.

v1.1.5(1y ago)15201.6k↓23.5%16[11 issues](https://github.com/pavloniym/nova-action-buttons/issues)[4 PRs](https://github.com/pavloniym/nova-action-buttons/pulls)MITVuePHP ^7.3|^8.0

Since Dec 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/pavloniym/nova-action-buttons)[ Packagist](https://packagist.org/packages/pavloniym/nova-action-buttons)[ RSS](/packages/pavloniym-nova-action-buttons/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)DependenciesVersions (9)Used By (0)

Nova Action Buttons
===================

[](#nova-action-buttons)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3cb8fcc5215e3e9a8b88aa91317d9406e2d80388187a30aa628e833794fe5041/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061766c6f6e69796d2f6e6f76612d616374696f6e2d627574746f6e733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pavloniym/nova-action-buttons)[![Licence](https://camo.githubusercontent.com/e29dae2d35b777657b7f7365c4306204e7cad04409ccc672821183b25f11a740/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7061766c6f6e69796d2f6e6f76612d616374696f6e2d627574746f6e733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/e29dae2d35b777657b7f7365c4306204e7cad04409ccc672821183b25f11a740/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7061766c6f6e69796d2f6e6f76612d616374696f6e2d627574746f6e733f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/9883a3971f0c157d74f275eb92cae80ea99bb3201df63bbda6626e14ab6bf49f/68747470733a2f2f706f7365722e707567782e6f72672f7061766c6f6e69796d2f6e6f76612d616374696f6e2d627574746f6e732f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/pavloniym/nova-action-buttons)

This [Laravel Nova](https://nova.laravel.com) package allows you to execute an action directly on your resource table view.

Requirements
------------

[](#requirements)

- `php: >=8.0`
- `laravel/nova: ^4.1`

Installation
------------

[](#installation)

Install the package in a Laravel Nova project via Composer:

```
composer require pavloniym/nova-action-buttons
```

Usage
-----

[](#usage)

### Single button

[](#single-button)

[![Nova Action Buttons](https://raw.githubusercontent.com/pavloniym/nova-action-buttons/main/.github/assets/screenshot1.png)](https://raw.githubusercontent.com/pavloniym/nova-action-buttons/main/.github/assets/screenshot1.png)
You can add single button to execute action from index row

```
use Pavloniym\ActionButtons\ActionButton;

public function fields(Request $request)
{
    return [

        // ... Nova default fields

        ActionButton::make('') // Name in resource table column
            ->icon('lightning-bolt') // heroicon name  ->icon('lightning-bolt')
            ->iconHtml('') // Svg (or html) icon
            ->iconUrl('https://img.com/icon.png') // Url of icon
            ->text('Refresh') // Title (optional)
            ->tooltip('Magic tooltip here') // Tooltip text (optional). If not provided, it will default to the action name.
            ->styles([]) // Custom css styles (optional)
            ->classes([]) // Custom css classes (optional)
            ->action(new RefreshAction, $this->resource->id) // Provide action instance and resource id
            ->asToolbarButton(), // Display as row toolbar button (optional)

        // ... Nova default fields
    ];
}
```

### Collection of buttons

[](#collection-of-buttons)

[![Nova Action Buttons](https://raw.githubusercontent.com/pavloniym/nova-action-buttons/main/.github/assets/screenshot2.png)](https://raw.githubusercontent.com/pavloniym/nova-action-buttons/main/.github/assets/screenshot2.png)
You can add collection of buttons to index row

```
use Pavloniym\ActionButtons\ActionButton;

public function fields(Request $request)
{
    return [

        // ... Nova default fields

        ActionButtons::make()->collection([
            ActionButton::make('')->action(),
            ActionButton::make('')->action(),
            ActionButton::make('')->action(),
        ])

        // ... Nova default fields
    ];
}
```

> This fields (both `ActionButton` and `ActionButtons`) are available on index and detail (Thanks to [@CosminBd](https://github.com/CosminBd)) views

Caveats
-------

[](#caveats)

- Currently, in order to use this field, you still have to declare the action in your resource `actions()` method.
- Tested only on `confirm-action-modal` action
- You should provide action instance in `action()` method of button.
- If you have action fields that are depends on resource instance -&gt; you should inject resource in action constructor, because Nova doesn't provide `NovaRequest` instance to `fields` method on index row

```
class RefreshAction extends Action
{

    private Torrent $torrent

    /**
     * @param Torrent $torrent
     */
    public function __construct(Torrent $torrent)
    {
        $this->torrent = $torrent;
    }

    /**
     * Get the fields available on the action.
     *
     * @param NovaRequest $request
     * @return array|null
     */
    public function fields(NovaRequest $request): ?array
    {

        // $request is empty if action is called from index row (or inline)
        // so use instance injected to action constructor
        $torrent = (fn(): ?Torrent => $request?->selectedResources()?->first())();
        $torrent = $torrent ?? $this->torrent;

        if ($torrent) {
            return [
                File::make('File')->creationRules(['required'])
            ];
        }

        return null;
    }

}
```

---

To hide the action either on Index or Detail, you can add the methods in the action declaration as per:

```
ActionButton::make('My action')
    ->action((new RefreshAction)->onlyOnDetail(), $this->resource?->id)
    ->icon('')
    ->asToolbarButton(),
```

This is available for both action buttons and action button groups, and it works in individual actions which are part of the action group.

---

To run actions without confirmation, you can add the `$withoutConfirmation = true` property to the Laravel Nova action or provide it as a method when you declare the action button

```
ActionButton::make('My action')
    ->action((new RefreshAction)->withoutConfirmation(), $this->resource?->id)
    ->icon('')
    ->asToolbarButton(),
```

License
-------

[](#license)

This project is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance22

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~100 days

Recently: every ~147 days

Total

8

Last Release

563d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/60f2554666408e1fdb9afac6f2ad657382a942e4e9998fd90ee4f27cd32ee90f?d=identicon)[pavloniym](/maintainers/pavloniym)

---

Top Contributors

[![pavloniym](https://avatars.githubusercontent.com/u/17234942?v=4)](https://github.com/pavloniym "pavloniym (12 commits)")[![fnematov](https://avatars.githubusercontent.com/u/25400796?v=4)](https://github.com/fnematov "fnematov (5 commits)")[![CosminBd](https://avatars.githubusercontent.com/u/37343923?v=4)](https://github.com/CosminBd "CosminBd (2 commits)")

---

Tags

actionsbuttonslaravelnovalaravelbuttonsactionsnova

### Embed Badge

![Health badge](/badges/pavloniym-nova-action-buttons/health.svg)

```
[![Health](https://phpackages.com/badges/pavloniym-nova-action-buttons/health.svg)](https://phpackages.com/packages/pavloniym-nova-action-buttons)
```

###  Alternatives

[laravel-lang/common

Easily connect the necessary language packs to the application

1463.1M22](/packages/laravel-lang-common)[maatwebsite/laravel-nova-excel

Supercharged Excel exports for Laravel Nova Resources

3986.2M5](/packages/maatwebsite-laravel-nova-excel)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[cybercog/laravel-nova-ban

A Laravel Nova banning functionality for your application.

40199.8k](/packages/cybercog-laravel-nova-ban)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)[padocia/laravel-nova-pdf

Generate Pdf from nova resources

2326.5k](/packages/padocia-laravel-nova-pdf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
