PHPackages                             bioman1464/nova-action-button - 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. [Admin Panels](/categories/admin)
4. /
5. bioman1464/nova-action-button

ActiveLibrary[Admin Panels](/categories/admin)

bioman1464/nova-action-button
=============================

A Laravel Nova field to run actions.

0.7.5(4y ago)04MITVuePHP &gt;=7.1.0

Since Nov 8Pushed 3y agoCompare

[ Source](https://github.com/Bioman1464/nova-action-button)[ Packagist](https://packagist.org/packages/bioman1464/nova-action-button)[ Docs](https://github.com/pdmfc/nova-action-button)[ RSS](/packages/bioman1464-nova-action-button/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Nova Action Button
==================

[](#nova-action-button)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fd420f521495097f9ce7134df9bd3e8666cc690a6829bbf6d3c771c11695e91b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70646d66632f6e6f76612d616374696f6e2d627574746f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pdmfc/nova-action-button)[![Licence](https://camo.githubusercontent.com/a3b68108f2c5c479814d04baab0a8936c15a4a1b6730aacf289f55ac44caa430/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70646d66632f6e6f76612d616374696f6e2d627574746f6e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/a3b68108f2c5c479814d04baab0a8936c15a4a1b6730aacf289f55ac44caa430/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70646d66632f6e6f76612d616374696f6e2d627574746f6e3f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/623d1a12db74e0004d3adb3215dd2b268f6906c2aec3e6543dc24cd2dad8e445/68747470733a2f2f706f7365722e707567782e6f72672f70646d66632f6e6f76612d616374696f6e2d627574746f6e2f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/pdmfc/nova-action-button)

This package allows you to execute an action directly on your resource table view.

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

[](#installation)

```
composer require pdmfc/nova-action-button
```

Usage
-----

[](#usage)

```
use App\Nova\Actions\ChangeRole;
use Pdmfc\NovaFields\ActionButton;

//...

public function fields()
{
    return [
        ActionButton::make('Action')
            ->action(ChangeRole::class, $this->id)
            //->action(new ChangeRole(), $this->id) using a new instance
    ];
}
```

The `action()` method requires two params - the action class name or a new instance, and the target resource id.

[![Basic example](images/basic_example.png)](images/basic_example.png)
----------------------------------------------------------------------

[](#)

### Disabling button

[](#disabling-button)

You can use the native Laravel nova [readonly()](https://nova.laravel.com/docs/3.0/resources/fields.html#readonly-fields) method to prevent users from clicking the button:

```
ActionButton::make('Action')
    ->action(ChangeRole::class, $this->id)
    ->readonly(function () {
        return $this->role->name === 'admin';
    })
```

[![Disabling the button](images/disable_example.png)](images/disable_example.png)

### Change the button text

[](#change-the-button-text)

To edit the button text content, use the `text()` method.

```
->text('Execute')
```

### Enable the loading animation on button and change color

[](#enable-the-loading-animation-on-button-and-change-color)

To enable the loading animation on button and change color, use `showLoadingAnimation()` and `loadingColor('#fff')` method.

```
->showLoadingAnimation()
->loadingColor('#fff') # default is #000
```

### Add a svg to the button

[](#add-a-svg-to-the-button)

In order to add a svg to the button, you first need to create a vue component containing a svg and then pass the component name to the `svg()` method.

```
->svg('VueComponentName')
```

### Change button color

[](#change-button-color)

To change button color, use `buttonColor('#21b970')` method.

```
->buttonColor('#21b970') # default is .btn-primary color
```

Caveats
-------

[](#caveats)

- Currently, in order to use this field, you still have to declare the action in your resource `actions()` method.

How to contribute
-----------------

[](#how-to-contribute)

- clone the repo
- on `composer.json` of a laravel nova application add the following:

```
{
    //...

    "require" {
        "pdmfc/nova-action-button: "*"
    },

    //...
    "repositories": [
        {
            "type": "path",
            "url": "../path_to_your_package_folder"
        }
    ],
}

```

- run `composer update pdmfc/nova-action-button`

You're now ready to start contributing!

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor3

3 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

1643d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/925922594475d5b96de1c3ae29fbc41dce6b79e8f4086de84f01ba99f73e5c12?d=identicon)[Bioman1464](/maintainers/Bioman1464)

---

Top Contributors

[![msouto346](https://avatars.githubusercontent.com/u/21067326?v=4)](https://github.com/msouto346 "msouto346 (7 commits)")[![felipereisdev](https://avatars.githubusercontent.com/u/7799406?v=4)](https://github.com/felipereisdev "felipereisdev (3 commits)")[![skoyah](https://avatars.githubusercontent.com/u/36083448?v=4)](https://github.com/skoyah "skoyah (3 commits)")[![Bioman1464](https://avatars.githubusercontent.com/u/36959420?v=4)](https://github.com/Bioman1464 "Bioman1464 (2 commits)")[![mgoncalves76](https://avatars.githubusercontent.com/u/70640840?v=4)](https://github.com/mgoncalves76 "mgoncalves76 (2 commits)")[![msoutopdmfc](https://avatars.githubusercontent.com/u/160144468?v=4)](https://github.com/msoutopdmfc "msoutopdmfc (2 commits)")[![HenriqueSPin](https://avatars.githubusercontent.com/u/12719645?v=4)](https://github.com/HenriqueSPin "HenriqueSPin (1 commits)")[![infostreams](https://avatars.githubusercontent.com/u/1132744?v=4)](https://github.com/infostreams "infostreams (1 commits)")[![jeffreyzant](https://avatars.githubusercontent.com/u/913317?v=4)](https://github.com/jeffreyzant "jeffreyzant (1 commits)")[![kayacekovic](https://avatars.githubusercontent.com/u/32109756?v=4)](https://github.com/kayacekovic "kayacekovic (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/bioman1464-nova-action-button/health.svg)

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

###  Alternatives

[benjacho/belongs-to-many-field

belongsToMany nova representation in field.

158811.4k1](/packages/benjacho-belongs-to-many-field)[pdmfc/nova-action-button

A Laravel Nova field to run actions.

37733.0k1](/packages/pdmfc-nova-action-button)[khalin/nova-link-field

A Laravel Nova Link field.

31562.2k2](/packages/khalin-nova-link-field)[ebess/nova-collapsible-sidebar

A collapsible sidebar for Laravel Nova.

32313.2k](/packages/ebess-nova-collapsible-sidebar)

PHPackages © 2026

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