PHPackages                             kayacekovic/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kayacekovic/nova-action-button

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kayacekovic/nova-action-button
==============================

A Laravel Nova field to run actions.

v0.7.4(4y ago)12.9kMITVuePHP &gt;=7.1.0

Since Apr 6Pushed 4y agoCompare

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

READMEChangelog (3)DependenciesVersions (12)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 kayacekovic/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
```

### 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

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor2

2 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

Every ~64 days

Recently: every ~93 days

Total

10

Last Release

1646d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a728b47a1ee9fd11f949888a6de60971bbeaf3057d022eab6a6e50491089b4b?d=identicon)[kayacekovic](/maintainers/kayacekovic)

---

Top Contributors

[![felipereisdev](https://avatars.githubusercontent.com/u/7799406?v=4)](https://github.com/felipereisdev "felipereisdev (3 commits)")[![kayacekovic](https://avatars.githubusercontent.com/u/32109756?v=4)](https://github.com/kayacekovic "kayacekovic (3 commits)")[![skoyah](https://avatars.githubusercontent.com/u/36083448?v=4)](https://github.com/skoyah "skoyah (3 commits)")[![mgoncalves76](https://avatars.githubusercontent.com/u/70640840?v=4)](https://github.com/mgoncalves76 "mgoncalves76 (2 commits)")[![msouto346](https://avatars.githubusercontent.com/u/21067326?v=4)](https://github.com/msouto346 "msouto346 (1 commits)")

---

Tags

laravelnova

### Embed Badge

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

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

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[inspheric/nova-defaultable

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

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12218.4k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

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