laravel 控制器多个方法共用一个路由

直接上代码:

Route::get('Index/{action}', function(AppHttpControllersIndexController $index, $action){
    return $index->$action();
});

控制器的其他使用和应用,请参考:http://laravelacademy.org/post/5866.html

原文地址:https://www.cnblogs.com/tujia/p/6270060.html