src/Controllers/PDFController.php
public function show(Request $request)
    {
        $pdf = PDF::loadView('laralum_pdf::pdf', ['text' => $request->text]);

        return Response::make($pdf->download('output.pdf'), 200, ['content-type' => 'application/pdf']);
    }
public function show(Request $request)
    {
        $pdf = PDF::loadView('laralum_pdf::pdf', ['text' => $request->text]);

        return Response::make($pdf->download('output.pdf'), 200, ['content-type' => 'application/pdf']);
    }
public function show ( Request $ request ) { $ pdf = PDF :: loadView ( 'laralum_pdf::pdf' , [ 'text' => $ request -> text ] ) ; return Response :: make ( $ pdf -> download ( 'output.pdf' ) , 200 , [ 'content-type' => 'application/pdf' ] ) ; }
Display the PDF.

@param \Illuminate\Http\Request $request

@return \Illuminate\Http\Response
Display the PDF .