Laravel错误Symfony \ Component \ HttpKernel \ Exception \ HttpException

时间:2015-01-15 17:16:38

标签: laravel error-handling routing

我的应用程序在Ubuntu中工作正常,但在将其迁移到Windows机器(本地)后,显示以下错误

Symfony \ Component \ HttpKernel \ Exception \ HttpException

这是我的routes.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('/', 'HomeController@index');
Route::any('/signup', 'HomeController@signup');
Route::any('/login', 'HomeController@login');
Route::get('/logout', 'HomeController@logout');

// Custom routes for admin section
Route::any('admin/login', 'AdminController@login');
Route::get('admin/logout', 'AdminController@logout');
Route::any('admin/permissions/get-role-permissions', 'PermissionsController@get_role_permissions');
Route::any('admin/permissions/configure', 'PermissionsController@configure');

// Grouped routes for admin section
Route::group(array('before' => 'adminauth', 'except' => array('/admin/login', '/admin/logout')), function() {
    Route::resource('/admin/roles', 'RolesController');
    Route::resource('/admin/permissions', 'PermissionsController');
    Route::resource('/admin', 'AdminController');

});

// Grouped routes for front end
Route::group(array('before' => 'auth'), function() {
    Route::resource('/dashboard', 'UserController@index');
    Route::resource('/posts', 'PostsController');
});

当我调用/ admin / roles或/ admin / permissions / configure时,我得到上面的错误,但它只适用于/ admin。

1 个答案:

答案 0 :(得分:0)

您的路线和最后一个路线组中有错误:

right