order = $order; } /** * Build the message. * * @return $this */ public function build() { app()->setLocale($this->order->locale); $this->order->load('products'); return $this->subject(trans('storefront::invoice.subject', ['id' => $this->order->id])) ->view("emails.{$this->getViewName()}", [ 'logo' => File::findOrNew(setting('storefront_mail_logo'))->path, ]); } private function getViewName() { return 'invoice' . (is_rtl() ? '_rtl' : ''); } }