user_credit = $user_credit; $this->subject = 'Gutschrift auf GrĂ¼ne Seele'; } public function build() { $title = __('email.credit_title'); $copy1line = __('email.credit_copy1line'); $filename = Credit::getFilename($this->user_credit); $path = Credit::getDownloadPath($this->user_credit); 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; } }