<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
//默认控制器
Route::get('/', 'Home\IndexController@index');
//前台路由组
Route::group(['namespace' => 'Home'], function(){
// 控制器在 "App\Http\Controllers\Home" 命名空间下
Route::get('/', [
'as' => 'index', 'uses' => 'IndexController@index'
]);
});
//后台路由组
Route::group(['namespace' => 'Admin', 'prefix' => 'admin'], function(){
// 控制器在 "App\Http\Controllers\Admin" 命名空间下
Route::get('/', [
'as' => 'index', 'uses' => 'IndexController@index'
]);
});