Browse Source

Merge remote-tracking branch 'gogs/master'

igb 2 days ago
parent
commit
15b26a2f50
1 changed files with 16 additions and 4 deletions
  1. 16 4
      routes/web.php

+ 16 - 4
routes/web.php

@@ -75,9 +75,7 @@ Route::prefix('products')->group(function () {
     Route::get('/categories/{categoryId}', [ProductController::class, 'category'])->name('products.category');
 });
 
-// 产品分类路由
-Route::get('/categories-{slug}', [ProductController::class, 'category'])
-    ->name('products.category.slug');
+
 
 // 视频路由
 Route::prefix('videos')->group(function () {
@@ -101,11 +99,12 @@ Route::prefix('contact')->group(function () {
     Route::get('/', [ContactController::class, 'create'])->name('contact.create');
     Route::post('/', [ContactController::class, 'store'])->name('contact.store');
 });
-
+//
 Route::prefix('collections')->group(function () {
     Route::get('/{slug}', [CollectionController::class, 'detail'])->name('collection.detail');
 });
 
+
 // Sitemap 路由
 Route::get('/sitemap.xml', [SitemapController::class, 'index'])->name('sitemap.index');
 
@@ -116,3 +115,16 @@ Route::fallback(function () {
     return $obj->abort404();
 });
 
+
+// 新分类路由
+// 产品分类路由
+Route::get('/categories-{slug}', [ProductController::class, 'category'])
+    ->name('products.category.slug');
+
+// 视频分类路由
+Route::get('/videos-{slug}', [VideoController::class, 'category'])
+    ->name('videos.category.slug');
+
+// 文章标签路由
+Route::get('/collections-{slug}', [CollectionController::class, 'detail'])
+    ->name('collections.tag.slug');