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
In my app the problem was caused by a cast to string:
public function myAction(): string { return redirect('/'); }
I had to remove : string to prevent the response from being cast to a string.
: string