*/ public function via(object $notifiable): array { return ['database', 'mail']; } /** * @return array */ public function toDatabase(object $notifiable): array { return [ 'workspace_id' => $this->declaration->workspace_id, 'declaration_id' => $this->declaration->id, 'sender_id' => $this->sender->id, 'notification_type' => NotificationType::Nudge, ]; } public function toMail(object $notifiable): NudgeNotificationMail { return new NudgeNotificationMail($this->declaration, $this->sender); } }