[英]Laravel 5.2 with Sentinel 2 - Maximum function nesting level of '100' reached, aborting
In my base template of app.blade.php I do a simple check to see if the user is logged in. It looks like this: 在我的app.blade.php基本模板中,我做了一个简单的检查来查看用户是否已登录。它看起来像这样:
@if (Sentinel::check())
<li><a href="members.aspx">Members</a></li>
@else
<li><a href="{{ url('/login') }}">Login</a></li>
<li><a href="{{ url('/register') }}">Register</a></li>
@endif
This triggers the Maximum function nesting level of '100' reached, aborting
. 这将触发
Maximum function nesting level of '100' reached, aborting
。 Any ideas why. 任何想法为什么。 I have the provider and facade defined properly in app.php.
我在app.php中正确定义了提供程序和外观。 Like this:
像这样:
'providers' => [
....
Cartalyst\Sentinel\Laravel\SentinelServiceProvider::class,
....
],
'aliases' => [
....
'Sentinel' => Cartalyst\Sentinel\Laravel\Facades\Sentinel::class,
....
],
Whilst I can't say why you are getting this error, I can tell you how to fix it; 虽然我无法说出您为什么会收到此错误,但我可以告诉您如何解决。 you need to edit your
xdebug.max_nesting_level
in your php.ini
. 您需要在
php.ini
编辑xdebug.max_nesting_level
。
Usually setting this to 200 or 300 does the trick, and is usually only an issue in local development where you are using xdebug. 通常将其设置为200或300可以解决问题,并且通常只是使用xdebug的本地开发中的一个问题。
You can set it like so; 您可以这样设置;
xdebug.max_nesting_level=200
or xdebug.max_nesting_level=300
. xdebug.max_nesting_level=200
或xdebug.max_nesting_level=300
。
More info on this setting can be found in the docs for xdebug. 有关此设置的更多信息,请参见xdebug 文档 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.