user = User::findOrFail($user); $this->ref_user = User::findOrFail($ref_user); } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['database']; } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'title' => __('Someone registered using your Code!'), 'content' => '

You received '.config('SETTINGS::REFERRAL::REWARD').' '.config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME').'

because '.$this->ref_user->name.' registered with your Referral-Code!

Thank you very much for supporting us!.

'.config('app.name', 'Laravel').'

', ]; } }