Skip to content
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

route_to function working incorrect #975

Closed
phambinh217 opened this issue Mar 28, 2018 · 2 comments
Closed

route_to function working incorrect #975

phambinh217 opened this issue Mar 28, 2018 · 2 comments

Comments

@phambinh217
Copy link

My routes

$routes->get('posts/(:any)/(:any)', 'Post::index/$2', ['as' => 'post-with-slug']);

When I use

route_to('post-with-slug', '2', '3');

I want to result is domain.com/posts/2/3

But now result is domain/posts/2/2

What am I doing wrong, or it is a bug?

@InsiteFX
Copy link
Contributor

Try only using one (:any) any matches to the end of the url

@lonnieezell
Copy link
Member

To expand on what @InsiteFX said, use (:segment) now any place you would have used (:all) in previous versions.

That being said - this area is reserved for bug-reports. The forums are the appropriate place to ask for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants