use Filament\Actions\Action;
private static function executeAction(Collection $records Action $action): void
{
$originallySelectedRecords = $action->getSelectedRecords();
if ($records->count() < $originallySelectedRecords->count()) {
// Uh oh, some did not pass the policy. I would not like to run this at all, not even for those that did.
return;
}
}
use Filament\Actions\Action;
private static function executeAction(Collection $records Action $action): void
{
$originallySelectedRecords = $action->getSelectedRecords();
if ($records->count() < $originallySelectedRecords->count()) {
// Uh oh, some did not pass the policy. I would not like to run this at all, not even for those that did.
return;
}
}