Seems like Livewire is always causing a file download to be first loaded into memory and I'm getting memory exceeded error. Moving the same code to Laravel controller works fine.
I've tried response()->download and response()->streamDownload with call to readFile as stream content.
If I move the download logic to a controller, then I cannot call it from Livewire component because redirect()->route() breaks the component rendering loop.
Any ideas? I have files >500 MB. Thanks