我的类别有一个 URL,如下所示:example.com/shop/category1
这是我的 web.php 中的代码:
Route::any('shop/{slug}', 'CategoryController@category')->name('category');
我还有很多其他的产品、文章等途径
但是当我分析我的网站时,我在所有这样的路线中都有这个商店:
example.com/products/shop
example.com/articles/shop
example.com/shop/shop
其他路由正常,不知道是什么问题!
其他路线:
Route::any('products', 'ProductController@index')->name('products.index');
Route::get('products/{slug}', 'ProductController@detail')->name('products.detail');
Route::get('articles', 'ArticleController@index');
Route::get('articles/{slug}', 'ArticleController@detail')->name('articles.show');
更新
路线屏幕: