energon7/custom-action-selector

This package allows you to change the action select box to a button view.

0.1.0 2020-12-19 23:26 UTC

This package is auto-updated.

Last update: 2024-10-21 15:01:41 UTC


README

Latest Version on Packagist Licence Total Downloads

This package allows you to change the action select box to a button view.

Installation

composer require energon7/custom-action-selector

Usage

NovaServiceProvider.php:

use Energon7\CustomActionSelector\CustomActionSelector;

//...

public function tools()
{
    return [
         new CustomActionSelector()
    ];
}

Then create any action:

php artisan nova:action SomeAction

You can add icon to a action button.

SomeAction.php:

  public $icon = '<svg> ... </svg>';
  public function __construct()
  {
      $this->withMeta([
          'icon' => $this->icon
      ]);
  }
  

Credits

License

This project is open-sourced software licensed under the MIT license.