failureNotification(fn (Notification $notification): Notification => $notification); $this->successNotification(fn (Notification $notification): Notification => $notification); } public function call(array $parameters = []) { return $this->evaluate($this->getAction(), $parameters); } public function cancel(): void { throw new Cancel(); } public function halt(): void { throw new Halt(); } /** * @deprecated Use `->halt()` instead. */ public function hold(): void { $this->halt(); } public function success(): void { $this->sendSuccessNotification(); $this->dispatchSuccessRedirect(); } public function failure(): void { $this->sendFailureNotification(); $this->dispatchFailureRedirect(); } abstract public function getLivewire(); protected function getDefaultEvaluationParameters(): array { return array_merge(parent::getDefaultEvaluationParameters(), [ 'arguments' => $this->getArguments(), 'data' => $this->getFormData(), 'livewire' => $this->getLivewire(), ]); } }