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

        return $pdf->download("$name.pdf");
    }
public function download(Request $request, $name = 'output')
    {
        $pdf = PDF::loadView('laralum_pdf::pdf', ['text' => $request->text]);

        return $pdf->download("$name.pdf");
    }
public function download ( Request $ request , $ name = 'output' ) { $ pdf = PDF :: loadView ( 'laralum_pdf::pdf' , [ 'text' => $ request -> text ] ) ; return $ pdf -> download ( "$name.pdf" ) ; }
Download the PDF.

@param string                   $name
@param \Illuminate\Http\Request $request

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