Support the ongoing development of Laravel.io →
posted 9 years ago
Requests
Last updated 2 years ago.
0

We did some additional testing:

  • Problem occurs in Laravel 4.2
  • Problem does not occur in Laravel 4.1
  • It seems that the default /foo/index/{one?}/etc.. route is named "foo.index" in 4.2, while in 4.1 it is not. I think herein lies the problem. (bug?)
Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

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!

Last updated 2 years ago.
0

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 :)

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

What about this? (Untested)

{{ route('foo.index', ['one' => 5]) }}
Last updated 2 years ago.
0

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 :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.