konsulting/nova-action-buttons

Allow actions to be shown as buttons in Laravel Nova

0.1.5 2023-10-02 11:02 UTC

This package is auto-updated.

Last update: 2024-11-29 22:44:12 UTC


README

THIS IS AN EARLY VERSION, TESTING AND FEEDBACK IS RECOMMENDED

As simple as possible package to allow showing actions as buttons rather than just dropdown list items.

We have used some other packages in the past, but as Nova evolves they have broken and not maintained quickly enough leading to bugs that are hard to track down.

To install, simply:

    composer require konsulting/nova-action-buttons:^0.1

To use, you will need to identify actions to be shown as a button. This will apply to Index Actions, Detail actions, Standalone and Inline Actions.

First add the trait to the Action.

use \Konsulting\NovaActionButtons\ShowAsButton;

class ExampleAction extends Action {
    use InteractsWithQueue, Queueable, ShowAsButton;
    //...
}

Then in the resources actions method you need to use the showAsButton() method when building the action.

    (new ExampleAction)->showAsButton();

We are happy to receive contributions to this package.