Action buttons
Last updated
Last updated
Action buttons are displayed when browsing a BREAD next to each row
You can add your own buttons very easily. First we will create an Action-class which extends Voyagers AbstractAction in app/Actions/MyAction.php
Next we need to tell Voyager that we want to use this action. For this open your app/Providers/AppServiceProvider.php
and search for the boot()
method
If you only want to show your action for special datatypes you can implement a function shouldActionDisplayOnDataType()
in your action:
Mass actions are called for multiple instances of a model. If you want your action to be a mass action, just implement the following method:
After that you will see your new button when browsing any BREAD