shopping_order = $shopping_order; $this->subject = 'Stornorechnung zu Deiner Bestellung: '.$shopping_order->getLastShoppingPayment('reference'); } public function build() { $title = __('email.cancellation_title'); $copy1line = __('email.cancellation_copy1line').Invoice::getNumber($this->shopping_order); $filename = Invoice::getCancellationFilename($this->shopping_order); $path = Invoice::getCancellationDownloadPath($this->shopping_order); if (! Storage::disk('public')->exists($path)) { return; } $file = Storage::disk('public')->path($path); $mime = Storage::disk('public')->mimeType($path); return $this->view('emails.blank')->with([ 'title' => $title, 'copy1line' => $copy1line, ])->attach($file, [ 'as' => $filename, 'mime' => $mime, ]); } }