简体   繁体   English

具有Sentinel 2的Laravel 5.2-达到最大功能嵌套级别'100',正在中止

[英]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=200xdebug.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.

相关问题 如何修复laravel 5.2这个错误“达到&#39;100&#39;的最大函数嵌套级别,正在中止!”? - How to fix laravel 5.2 this error "Maximum function nesting level of '100' reached, aborting!"? 达到最大功能嵌套级别“ 100”,从而中止了Laravel 5.1 - Maximum function nesting level of '100' reached, aborting Laravel 5.1 达到最大功能嵌套级别&#39;100&#39;,中止 - Maximum function nesting level of '100' reached, aborting PHP Singleton:达到最大功能嵌套级别“ 100”,正在中止 - PHP Singleton : Maximum function nesting level of '100' reached, aborting Yii2错误:达到“100”的最大功能嵌套级别,正在中止 - Yii2 error:Maximum function nesting level of '100' reached, aborting PHPUnit显示达到的最大函数嵌套级别&#39;100&#39;,正在中止 - PHPUnit displays Maximum function nesting level of '100' reached, aborting 达到最大嵌套等级100,中止! - PHP - Maximum Nesting Level of 100 Reached, Aborting! - PHP 创建新的中间件时,Laravel抛出:“达到最大功能嵌套级别&#39;100&#39;,正在中止!” - When creating a new middleware, Laravel throws: “Maximum function nesting level of '100' reached, aborting!” PHP致命错误:函数最大嵌套级别达到&#39;100&#39;,正在中止! 在Laravel - PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in Laravel 达到&#39;100&#39;的最大功能嵌套级别,升级到Laravel 5.1后中止 - Maximum function nesting level of '100' reached, aborting after upgrading to Laravel 5.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM