-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redirect()->to() problem with output buffering #769
Comments
Well, it's designed to be returned not just ran, so |
Initially I was using |
Gotcha, and that's what I was afraid of. So, that's something I'll take a look into in the near future. Filters, however, were designed for exactly what you're trying to do. |
Debug off -> work redirect()->to(...) |
I have an AdminController class that all the rest of the controllers will extend.
in the constructor of AdminController I check if the user is already logged, otherwise...
redirect()->to('/admin/user/login');
but it doesn't get redirected, even though I see the 'Location;' header sent to the browser correctly.
Seems to be a problem with the output buffering
For it to work I should do
should we make the redirect()->to() method call ob_end_flush()?
Thanks in advance!
The text was updated successfully, but these errors were encountered: