Asked by: dil
Below is my current code I want to store the pdf inmy files without view it . is it possible ? when user store the data for $bus object on db. I want to store below pdf on my local.
$user = Festivals::where('id', $bus->id)->first();
$pdf = PDF::loadView('user.view', compact('user'));
$name = 'Ref_no' . $user->ref_no . '_' . date('m-d-Y') . '.pdf';
return $pdf->download($name);
No comments:
Post a Comment