45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
|
// +----------------------------------------------------------------------
|
|
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
|
// +----------------------------------------------------------------------
|
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
// +----------------------------------------------------------------------
|
|
// | Author: liu21st <liu21st@gmail.com>
|
|
// +----------------------------------------------------------------------
|
|
use think\facade\Route;
|
|
|
|
Route::get('/', 'Index/index');
|
|
|
|
// 产品相关路由
|
|
Route::group('product', function() {
|
|
// 产品列表页
|
|
Route::get('index/:id', 'Product/index')->name('product_index');
|
|
// 产品详情页
|
|
Route::get('detail/:id', 'Product/detail')->name('product_detail');
|
|
// 产品搜索页
|
|
Route::get('search', 'Product/search');
|
|
});
|
|
|
|
// 文章相关路由
|
|
Route::group('article', function() {
|
|
// 文章列表页
|
|
Route::get('index/:pid', 'Article/index');
|
|
// 文章详情页
|
|
Route::get('detail/:id', 'Article/detail');
|
|
// 文章搜索页
|
|
Route::get('search', 'Article/search');
|
|
// 文章留言
|
|
Route::post('comment', 'Article/comment');
|
|
});
|
|
|
|
// 问答中心
|
|
Route::group('faq', function() {
|
|
// 问答列表页
|
|
Route::get('index', 'Faq/index');
|
|
});
|
|
|
|
// 数据迁移
|
|
Route::get('/data/migration', 'DataMigration/index');
|