phoneFollowUp = $phoneFollowUp; $this->body = $body; } public function via($notifiable) { $channels = ['database']; if (isPusherEnabled()) { $channels[] = 'broadcast'; } return $channels; } public function toArray($notifiable) { return [ 'phone_follow_up_id' => $this->phoneFollowUp->id, 'business_id' => $this->phoneFollowUp->business_id, 'mobile_number' => $this->phoneFollowUp->mobile_number, 'body' => $this->body, ]; } public function toBroadcast($notifiable) { return new BroadcastMessage([ 'title' => __('crm::lang.phone_list'), 'body' => $this->body, 'link' => action([\Modules\Crm\Http\Controllers\PhoneListController::class, 'index']), ]); } }