You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we have laravel debugbar installed and try to download csv, the csv file includes the laravel debugbar scripts and styles along with actual records.
// Code to reproduce the issueRoute::get('test', function () {
return (new \Rap2hpoutre\FastExcel\FastExcel(\App\Models\User::all()))->download('users-list.csv');
});
// How i fixed this issueRoute::get('test', function () {
return response()->streamDownload(function () {
return (new \Rap2hpoutre\FastExcel\FastExcel(\App\Models\User::all()))->download('users-list.csv');
});
});
If possible please add this piece of code to docs somewhere.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi, thank your for your contribution! And thank you for the workaround you provided! 👍
If possible please add this piece of code to docs somewhere.
I think it could be even better to actually add your code in the lib itself, in order to make it work for everybody without having to read the doc! I just pushed this here: c87837f.
Hi,
When we have laravel debugbar installed and try to download csv, the csv file includes the laravel debugbar scripts and styles along with actual records.
If possible please add this piece of code to docs somewhere.
Thanks.
The text was updated successfully, but these errors were encountered: