'required|email', ]; } public function createData(array $input): array { return [ 'email' => $input['email'], ]; } public function data(): array { return [ 'email' => $this->notificationChannel->data['email'] ?? '', ]; } public function connect(): bool { try { Mail::to($this->data()['email'])->send( new NotificationMail('Test VitoDeploy', 'This is a test email!') ); } catch (Throwable) { return false; } return true; } public function send(object $notifiable, Notification $notification): void { /** @var NotificationChannel $notifiable */ $this->notificationChannel = $notifiable; $message = $notification->toMail($notifiable); Mail::to($this->data()['email'])->send( new NotificationMail($message->subject, $message->render()) ); } }