Controller:
public function download(){
$headers = array('Content-Type' => 'text/csv');
return Response::download('download.csv', 'download.csv', $headers)->setContentDisposition('inline');a
}
Filter:
$response->header('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
Error:
[2016-01-19 15:34:29] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined method Symfony\Component\HttpFoundation\BinaryFileResponse::header()' in C:\xampp\htdocs\development\app\filters.php:60
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []
I don't know how to solve this kind of problem. I already tried this but still not working.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire