Skip to content

v1.2.7

Compare
Choose a tag to compare
@luanfreitasdev luanfreitasdev released this 31 Aug 20:08
· 1108 commits to main since this release
  • 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