Export Excel from an Action
I would like to download/export csv/xls file from an action button. The code was executed, but there's no csv/xls file downloaded after notification is triggered.
How do we trigger download from inside an action?
3 Replies
return Excel::downlo....
Here's how I'm currently doing it:
In my blade:
Works flawlessly. Hope this helps.
If you haven't checked out Maatwebsite package for excel, it's super easy.
Thanks @Jon Mason . My code actually working, but I didn't return the
Excel:download...
part. It need to be returned to download the file.