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, GeneralSettings $general_settings, ReferralSettings $referral_settings) { return [ 'title' => __('Someone registered using your Code!'), 'content' => '

You received '. $referral_settings->reward . ' ' . $general_settings->credits_display_name . '

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

Thank you very much for supporting us!.

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

', ]; } }