Skip to content

v1.2.6

Compare
Choose a tag to compare
@luanfreitasdev luanfreitasdev released this 31 Aug 19:07
  • 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