本课教你创建 服务器的 路由功能
如果你以前用过其它语言的框架,应该对路由不会陌生
比如 PHP的 Laravel里专门有个routes.php用来配置路由信息,形如:
如果你以前用过其它语言的框架,应该对路由不会陌生
比如 PHP的 Laravel里专门有个routes.php用来配置路由信息,形如:
<?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 Closure to execute when that URI is requested.
|
*/
Route::get('/', function()
{
return View::make('hello');
});
Route::get ('DZGame/ID101/{operation}', 'DZGame\ID101\Controller@main');