v1.2.7
- added can method in actions - when false, it will not be visible on the screen
public function actions(): array
{
$canDelete = false;
return [
Button::add('destroy')
->caption(__('Delete'))
->caption(__('Delete'))
**->can($canDelete)**
->class('bg-red-500 text-white')
->route('product.destroy', ['product' => 'id'])
->method('delete'),
//...
];
}
https://livewire-powergrid.docsforge.com/#action-and-header-methods