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

Try to put this route,

Route::get('/api/v1/{category}/{product?}/{id?}',array('uses' => 'ProductApiController@index'));

above

Route::get('/{category}/{product?}/{id?}',array('uses' => 'ProductController@index'));

Last updated 2 years ago.
0

Thank you that did solve it. Curious why the order is important for this to work?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ramakip ramakip Joined 23 Jul 2014

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.