I had the same problem. I have restrictions on each path parameter (as you always need), and, unfortunately, a conflict arises between the following:
Route::get('{userId}/{path}', [ 'as' => 'products', 'uses' => ' HomeController@click ' ])->where(['id' => '[0-9]+', 'path' => '[0-9a-fA-F]+']); Route::get('link/{link_path}', [ 'as' => 'product-link', 'uses' => ' UserController@productLink ' ])->where(['link_path' => '[0-9a-fA-F]+']);
If at least one path has an added βlink /β in the path, it still tries to hit another. Placing a route with an added βlink /β over another route, it takes precedence and works.
Personally, I think that if you have a condition that does not occur on the route, where it should skip the route and go to the next. It makes no sense for me to set a condition that is not actually skipped if the conditions are not met.
Hope this helps someone else with this issue.
source share