user->token = Password::getRepository()->create($user); } /** * Get the notification's delivery channels. * * @return array */ public function via() { return ['mail']; } /** * Get the mail representation of the notification. * * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail() { \Log::error(print_r($this->user->toArray(), true)); return (new MailMessage()) ->subject(trans('mail.welcome', ['name' => $this->user->first_name.' '.$this->user->last_name])) ->markdown('notifications.Welcome', $this->user->toArray()); } }