I am using PHPExcel to generate an excel sheet and then output the file for download (force download). If I am to use the following from the controller file it works as expected:
return Response::download($file_path, 'myfile.xlsx');
But, I have to trigger this behavior from the Model and this does not seem to work.
Any suggestions?