问题描述
请帮我看看发生了什么.我刚刚建立了一个基本的Laravel项目.这是一个新的Laravel项目(5.2.29)
Please, help me to find what is going on.I just set up a basic Laravel project. It's a new fresh Laravel project (5.2.29)
这是route.php
This is route.php
Route::get('/', 'TestController@index');
这是测试控制器
class TestController extends Controller
{
public function index()
{
return view('home');
}
}
home.blade.php是一个带有全新Laravel安装的程序,其中一个打印了"Laravel 5".
The home.blade.php is the one that comes with a fresh Laravel installation, the one printing "Laravel 5".
当我添加网络"中间件时,如下所示
When I add the 'web' middleware, as following
Route::group(['middleware' => ['web']], function () {
Route::get('/', 'TestController@index');
});
我收到此错误:达到最大功能嵌套级别'100',正在中止!".我读了一些有关xDebug的主题,所以我将这一行添加到xdebug.ini
I get this error: "Maximum function nesting level of '100' reached, aborting!".I read some thread about xDebug, so i add this line to xdebug.ini
xdebug.max_nesting_level = 1000
但没有任何改变.
有帮助吗?或对我还能检查什么的任何建议?谢谢
Any help? Or any suggestion on what else could I check?Thank you
推荐答案
尝试删除 web
中间件,因为现在它会自动应用于所有路由.因此,从v5.2.27开始,您无需应用 web
中间件来避免错误.
Try to remove web
middleware, because now it applies automatically to all routes. So, since v5.2.27 you do not need to apply web
middleware to avoid errors.
这篇关于Laravel 5.2,最大功能嵌套级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!