sale->loadMissing(['lines', 'location']); } public function envelope(): Envelope { $location = $this->sale->location; // Receipt From is the store/location, never the Ladill POS product brand. $fromName = trim((string) ($location?->receipt_header ?: $location?->name ?: '')) ?: 'Receipt'; return new Envelope( from: new Address( (string) config('mail.from.address', 'receipts@ladill.com'), $fromName, ), subject: 'Your receipt '.$this->sale->reference.' from '.$fromName, ); } public function content(): Content { return new Content( view: 'emails.digital-receipt', with: [ 'sale' => $this->sale, 'location' => $this->sale->location, ], ); } }