-
Any leads on how to download the generated file on Laravel Livewire. I have followed the documentation as follows:
but nothing happens when on click of a button, I call a function containing this code. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
I haven't had to do this myself yet. If you find out, let us know, and I'll put it in the readme. |
Beta Was this translation helpful? Give feedback.
-
After tinkering with it, I ended up having to do this to start the download:
Hence omitting |
Beta Was this translation helpful? Give feedback.
-
hello, i have same issue and i can not resolve, can you please tell me what is wrong i am doing- |
Beta Was this translation helpful? Give feedback.
-
Hmm, it is a bit weird that if I use xlsx extension it works as the accepted answer suggests, but if I use identical code but just change it to CSV and the content of the file is empty so nothing happens, while the documentation suggests just swapping the extension should resolve in the same result. Any ideas how to make it work with CSV? Works as expected -
Does not work -
|
Beta Was this translation helpful? Give feedback.
After tinkering with it, I ended up having to do this to start the download:
Hence omitting
$writer->toBrowser();