$this->localizedPackageName()]), ); } public function content(): Content { return new Content( view: 'emails.purchase', with: [ 'purchase' => $this->purchase, 'user' => $this->purchase->tenant->user, 'package' => $this->purchase->package, 'packageName' => $this->localizedPackageName(), ], ); } public function attachments(): array { return []; } private function localizedPackageName(): string { $locale = $this->locale ?? app()->getLocale(); return optional($this->purchase->package)->getNameForLocale($locale) ?? ''; } }