Added preview to invoice, estimate & payment pdfs

This commit is contained in:
harshjagad20
2022-03-03 12:55:57 +05:30
parent cc737593b7
commit c897521137
6 changed files with 32 additions and 3 deletions

View File

@@ -412,6 +412,10 @@ class Estimate extends Model implements HasMedia
'taxes' => $taxes,
]);
if (request()->has('preview')) {
return view('app.pdf.estimate.'.$estimateTemplate);
}
return PDF::loadView('app.pdf.estimate.'.$estimateTemplate);
}