Closed nikoo-eshratabadi closed 2 months ago
This package creates a macro on the Action class. If your CustomImpersonation
class doesn't extend the default Nova Action class, you can work around this by defining the same macro for it.
i actually do extend the default nova action class . It looks something like this.
use Laravel\Nova\Actions\Action;
class CustomImpersonation extends Action
{
use InteractsWithQueue, Queueable, showAsButton;
public function handle(ActionFields $fields, Collection $models)
{
return true;
}
}
update : i'm using https://packagist.org/packages/lednerb/nova-action-button-selectors in my action. maybe this is preventing the icon from appearing but when i delete the 'showAsButton' trait from my action, the icon still doesn't work. and it's only visible in the drop down menu ... like this
use Lednerb\ActionButtonSelector\ShowAsButton;
class CustomImpersonation extends Action
{
use InteractsWithQueue, Queueable, showAsButt
}
and i register it like this
``` public function actions(NovaRequest $request)
{
return [
CustomImpersonation::make()->showInline()->icon('finger-print')
];
}
Laravel Version: 10.10 Nova Version: 4.25.1 PHP Version: 8.1.23
i'm having trouble adding icon to my actions with this error. " Method 'icon' not found in Actions\CustomImpersonation " Although i have required this package, i can't add an icon