I'm running my development environment through vagrant (Ubuntu, nginx, php-fpm) and accessing the server on localhost:8080. I'm using Laravel 4 and trying to set up my authentication system. It seems that Laravel just ignores the port you are using if you are using an alternative port. Is this true? For example, when I run a redirect from http://localhost:8080/login
to /profile
I end up on http://localhost/profile
. Does anyone have any suggestions on how I can fix/patch this?
This smells like a bug. I get stuck digging in the UrlGenerator when it looks for the request->root()
. From what I can see there is no root()
function on the Symfony\Component\HttpFoundation\Request. You could try replacing ->root()
with ->getBaseUrl()
instead.
Regardless of the outcome, you should prepare a small test case (with as little excess code as possible) and report the issue on GitHub to be fixed. If you can find a solution while you're at it then a pull request can be made to fix the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With