【发布时间】:2014-01-31 03:44:16
【问题描述】:
我有以下路线,可以正常工作
Route::get('admin/login', array('as'=>'login', function()
{
return View::make('back_end.login');
}));
app
views
back_end
layouts
index.blade.php
main.blade.php
profile.blade.php
login.blade.php
对于管理员,我有任何显示视图,我想将其与管理员前缀分组。在此操作后并使用
http://localhost/laravel/public/admin/login
http://localhost/laravel/public/admin/profile
网址我收到此错误:
Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
这是我的路线:
Route::group(array('prefix' => 'admin'), function()
{
Route::get('login', function()
{
return View::make('back_end.login');
});
Route::get('index', array('as'=>'dashboard'), function()
{
return View::make('back_end.layouts.index');
});
Route::get('profile', function()
{
return View::make('back_end.layouts.profile');
});
});
如何修复这条路线。请帮帮我
【问题讨论】:
-
运行
composer dump-autoload看看是否能解决问题。