jeudi 27 septembre 2018

return message and generate PDF Laravel

In laravel 5.6 I want to return 2 argument 1. message , 2. pdf .

Laravel Packege that i use for pdf is barryvdh/laravel-dompdf.
For message package is laracasts/flash.

        $data = $request;
        $pdf = PDF::loadView('admin.sample',compact('data'));
        $pdf->download('sample'); 

        $message = flash('Order Placed!!'); 

        return  response()->download($pdf);   



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2xFnn9K
via IFTTT

Aucun commentaire:

Enregistrer un commentaire