0
私はLaravelをスナッピーラッパーで使用しています。それは、PDFをパブリックフォルダに保存する以外はすべて動作します。別のフォルダに移動します。スナッピーのgitサイトや設定ファイルには何も明白ではありません。そしてwkhtlptopdfドキュメントは非常にまばらなものです。 $pdf->save()
ステートメントを変更して、どこに行きたいのですか?私のPDFは、このようなlaravelによって生成されるSnappy/WKHTMLtoPDF - 保存フォルダを変更するには
:
if($email == 'email'){
$quotation = $this->quotation->get_PdfQuote($ref);
$pdf = PDF::loadView('quotations/pdf_quotation',compact('quotation'));
$pdf->save($ref.'.pdf'); //THIS SAVES INTO THE PUBLIC FOLDER.
$title = 'Your Quotation';
$firstname = $customer['firstname1'];
$pathtoFile = '/var/www/auburntree/public/'.$ref.'.pdf';
Mail::send('emails.quotation', ['title' => $title, 'firstname'=>$firstname ], function ($m) use($customer,$pathtoFile) {
$m->from('[email protected]', 'Auburntree');
$m->to($customer['email1'],($customer['firstname1'] . $customer['lastname1']))->subject('Your Quotation');
$m->attach($pathtoFile);
});
Flash::success('The Quote Has Been Saved. An Email has ben sent to the customer ');
return redirect ('quotes');
} else