server->loadMissing('user'); $this->server = $event->server; $this->user = $event->server->user; $this->user->notifyNow($this); } /** * 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 { return (new MailMessage) ->greeting('Hello '.$this->user->username.'.') ->line('Your server has finished installing and is now ready for you to use.') ->line('Server Name: '.$this->server->name) ->action('Login and Begin Using', route('index')); } }