I\'m currently developing a web app using Laravel, and the app was working perfectly fine until recently. I had no idea what triggered it but here\'s a summary of the issue
I faced same issue and after spending my whole weekend to find actual cause and fix this issue. I landed on this stackoverflow question and felt its same issue as that of mine.
I used following core php function to redirect instead of returning a view file from controller.
header('Location: /');
It printed actual file which had blank line. Removing this line fixed my problem.
There were thousands of files in my code base. My assumption was that I have tried different scripts to find such blank lines at start of any file and there was no such file as per those scripts results. I assumed there is is no blank line in any of my files. But header('Location: /') proved that my assumption was not correct and I was working on wrong lines.