Untitled
unknown
plain_text
2 years ago
646 B
6
Indexable
/**
* Create an HTTP response that represents the object.
*
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*/
public function toResponse($request)
{
$transaccion = ($this->repositories->transaccionRepository->findById($this->parametro))->recibo();
$pdf = pdf::loadView('pdf.transaccion.recibo', ['recibo' => $transaccion]);
$output = $pdf->stream();
return new response($output, 200, [
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'inline;filename="myfilename.pdf"'
]);
}
Editor is loading...
Leave a Comment