application = $application; } /** * Build the message. */ public function build() { $topicLabel = match ($this->application->topic ?? 'apply') { 'apply' => 'Application', 'bug' => 'Bug Report', 'contact' => 'Contact', default => 'Message', }; return $this->subject("New {$topicLabel}: " . ($this->application->name ?? 'Unnamed')) ->from(config('mail.from.address'), config('mail.from.name')) ->view('emails.staff_application_received') ->text('emails.staff_application_received_plain') ->with(['application' => $this->application, 'topicLabel' => $topicLabel]); } }