如何解决 Laravel 5 嵌套级别达到 '100' 中止

How to solve Laravel 5 nesting level of '100' reached aborting

在 Laravel 5 我安装了 AdminLTE 模板。此模板提供路由文档 https://github.com/acacha/adminlte-laravel/blob/master/src/Http/routes.php。但是我对路由进行了一些更改,因为我想要默认登录路由

    Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::get('/', 'Auth\AuthController@getLogin');
    Route::post('auth/login', 'Auth\AuthController@postLogin');
    Route::get('auth/logout', 'Auth\AuthController@getLogout'); 
});

如果我使用它,我将面临以下错误

FatalErrorException in Factory.php line 5: Maximum function nesting level of '100' reached, aborting!

但我删除了中间件,所以工作正常。那么我的问题是什么或者我错过了什么。

首先从这里打开你的 xdebug conf 文件 /etc/php5/mods-available/xdebug.ini

然后根据需要将 xdebug 嵌套级别设置为超过 100 xdebug.max_nesting_level=500