We did some additional testing:
I just ran a test of the above route code and the route template var returned http://dev.lan/foo?5 as the url.
I'm using Laravel 4.2.9
Oops! I misreported in the original post. Still though, the routing helper behavior seems to be different between 4.1 and 4.2 and feels buggy to me. Any ideas?
P.s. Thanks for taking the time to test, I appreciate it!
ArondeParon said:
Oops! I misreported in the original post. Still though, the routing helper behavior seems to be different between 4.1 and 4.2 and feels buggy to me. Any ideas?
P.s. Thanks for taking the time to test, I appreciate it!
No ideas that I can think of its been awhile since I used 4.1 to remember the differences.
Welcome :)
If anyone has ideas regarding this issue, I'd very much like to hear them. It feels like a bug was introduced in 4.2. If this is not a bug, then it seems that default behavior has changed and it should be documented.
What about this? (Untested)
{{ route('foo.index', ['one' => 5]) }}
gpluess said:
What about this? (Untested)
{{ route('foo.index', ['one' => 5]) }}
In 4.2, this results in:
/foo?one=5
In 4.1, this results in:
/foo/index/one/5
I am currently actually using this method in production with a workaround to use query variables instead of the routing parameters, but it isn't very desirable :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community