user = $user; } /** * Get the notification's delivery channels. * * @return array */ public function via() { return ['mail']; } /** * Get the mail representation of the notification. * * @return MailMessage */ public function toMail(): MailMessage { return (new MailMessage) ->subject("New registration: {$this->user->first_name} {$this->user->last_name}") ->greeting('New registration') ->line("User: {$this->user->first_name} {$this->user->last_name}") ->line("ID: {$this->user->id}") ->line("Email: {$this->user->email}"); } }