public function getTableActions(): array
{
return [
Action::make('Edit')->form($this->getFormSchema())->modalWidth('md')->action(function ($data) {
$this->company->benefits()->updateExistingPivot($data['id'], ['benefit_description' => $data['description']]);
}),
Action::make('Delete')->requiresConfirmation()->action(function ($data) {
$this->company->benefits()->detach($data['id']);
}),
];
}
public function getTableActions(): array
{
return [
Action::make('Edit')->form($this->getFormSchema())->modalWidth('md')->action(function ($data) {
$this->company->benefits()->updateExistingPivot($data['id'], ['benefit_description' => $data['description']]);
}),
Action::make('Delete')->requiresConfirmation()->action(function ($data) {
$this->company->benefits()->detach($data['id']);
}),
];
}