onQueue((string) config('mail.brand.incident_queue', 'incidents')); } public function build(): static { $site = (string) config('app.name'); $status = $this->resolved ? 'Resolved' : 'Detected'; $services = (string) $this->incident->services->pluck('name')->join(', '); $impact = ucfirst($this->incident->impact->value); $preheader = $this->resolved ? "{$impact} incident on {$services} has been resolved." : "{$impact} impact incident detected on {$services}."; return $this->from((string) config('mail.from.address')) ->brandedSubject("Service incident {$status}: {$services}") ->view('emails.incidentDetected') ->text('emails.text.incidentDetected') ->with([ 'incident' => $this->incident, 'services' => $services, 'resolved' => $this->resolved, 'site' => $site, 'preheader' => $preheader, 'statusUrl' => url('/admin/status'), ]); } }