afterCommit(); } /** * Get the notification's delivery channels. * * @return list */ public function via(): array { return ['mail']; } /** * Get the mail representation of the notification. */ public function toMail(): MailMessage { $message = (new MailMessage) ->greeting('Hello '.$this->user->name.'!') ->line('You are receiving this email because an account has been created for you on '.JsonValueGuard::string(config('app.name')).'.') ->line('Username: '.$this->user->username) ->line('Email: '.$this->user->email); if (($this->token) !== null) { return $message->action('Setup Your Account', url('/auth/password/reset/'.$this->token.'?email='.urlencode($this->user->email))); } return $message; } }