As seen in the image below. When we select the record from the listing than action drop down appear. But I need to show it always, either user selects some record or not.
Asked
Active
Viewed 5,081 times
2 Answers
14
I know this is old, but hopefully it helps somebody. The Standalone Actions is what you're looking for. Not sure if this was a feature when @VolkerRose posted his answer.
Place this at the bottom of your Nova Resource.
public function actions(Request $request)
{
return [
Actions\ImportSalesForceRecords::make()->standalone(),
];
}
I was really wanting the action button to be right next to the create button, but this will work.

daugaard47
- 1,726
- 5
- 39
- 74
-
This should mention, that this will `disconnect` the `action button` from `databases` and always receive an empty array in its `handle` method. Source: https://nova.laravel.com/docs/3.0/actions/registering-actions.html#standalone-actions – Artur Müller Romanov Nov 03 '21 at 16:18
3
Maybe "Inline Actions" can help you out? (Which are not really adequate covered over at https://nova.laravel.com/docs/3.0/actions/defining-actions.html.)
class SomeAction extends Action
{
public $showOnTableRow = true;
// [...]
}
If you are trying to limit your actions visibility with the canSee
method, there is an existing issue regarding Inline Actions: https://nova.laravel.com/docs/3.0/actions/defining-actions.html#action-visibility.

Volker Rose
- 1,808
- 15
- 16