message = $message; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['db']; } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'data' => $this->message['body'], ]; } /** * Get the array for optional database field that added to original table. * @param $notifiable * @return array */ public function toDatabaseOptional($notifiable) { return [ 'business_id' => $this->message['business_id'] ?? null ]; } }