本文介绍了Laravel 4:路由组的默认路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试处理路由组的默认路由,我有这个,但是它不起作用.
I try to handle the default route of a route group, I have this but it doesn't work.
Route::group(array('prefix' => 'administrator'), function() {
Route::get('/', 'AdminUserController@getLogin');
Route::controller('page', 'AdminPageController');
Route::controller('user', 'AdminUserController');
Route::controller('menu', 'AdminMenuController');
});
有人知道怎么做吗?
谢谢
推荐答案
只需弄清楚即可.您缺少uses
,第二个参数应该是数组.
Just figured out. You are missing a uses
, and the second parameter should be an array.
Route::get('/', ['uses' => 'AdminUserController@getLogin']);
这篇关于Laravel 4:路由组的默认路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!