shopping_order = $shopping_order; if($shopping_order->user_white_label){ //Bei allen, die ein eigenes Logo haben $this->subject = 'Partner (mit Logo) - Firma (Vorname Nachname)'; }else{ //Bei allen, die kein Tattoostudio sind $this->subject = 'Partner - Firma (Vorname Nachname)'; } } public function build() { $title = false; $copy1line = false; $filename = Invoice::getFilename($this->shopping_order); $path = Invoice::getDownloadPath($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, ]); // attach file; } }