to = $to[0]; } else { $this->to = $to; } return $this; } /** * Set the topic of the FCM message. * * @param string $topic * @return $this */ public function topic(string $topic) { $this->topic = $topic; return $this; } /** * Set the data of the FCM message. * * @param array $data * @return $this */ public function data(array $data) { $this->data = $data; return $this; } /** * Set the notification of the FCM message. * * @param array $notification * @return $this */ public function notification(array $notification) { $this->notification = $notification; return $this; } /** * Set the condition for receive the FCM message. * * @param string $condition * @return $this */ public function condition(string $condition) { $this->condition = $condition; return $this; } /** * Set the priority of the FCM message. * * @param string $priority * @return $this */ public function priority(string $priority) { $this->priority = $priority; return $this; } }