1 不带分组名
形式1:http://域名.com/search.html
形式2:http://域名.com/ detail/1.html
Route::group('', function () {
// 详情
Route::get('detail/:id', 'home/Article/detail');
// 搜索
Route::get('search', 'home/Article/search');
})->ext('html');
2 附带分组名
形式1:http://域名.com/home/search.html
形式2:http://域名.com/home/detail/1.html
Route::group('home', function () {
// 详情
Route::get('detail/:id', 'home/Article/detail');
// 搜索
Route::get('search', 'home/Article/search');
})->ext('html');
3 附带前缀
形式1:http://域名.com/home/search.html
形式2:http://域名.com/home/detail/1.html
Route::group('home', function () {
// 详情
Route::get('detail/:id', 'Article/detail');
// 搜索
Route::get('search', 'Article/search');
})->prefix('home/')->ext('html');