requiresConfirmation(); $this->before(function ($action) { foreach ($this->getRecords() as $record) { $this->createActionLog($action, $record, false); } }); $this->after(fn () => $this->batchFinishedLog()); $this->modalWidth(MaxWidth::FourExtraLarge); $this->action(fn (Collection $records, array $data) => $this->handle($records, $data)); } /** * Handle the action. * * @param Collection $records * @param array $fields * @return void */ abstract public function handle(Collection $records, array $fields): void; }