Kindly Help
Sep 3, 2018
2
Level 1
i need to export date from data base in form of pdf
public function download()
{ //PDF file is stored under project/public/download/info.pdf $file= public_path(). "/download/hallo.pdf"; //print_r($file); die;
$headers = array(
'Content-Type: application/pdf',
);
return Response::download($file, 'filename.pdf', $headers);
}
my function look like this but its not working its downloading empty file!
my simply route: Route::get('pdf',array('as'=>'pdf','uses'=>'registerController@download'));
Please or to participate in this conversation.