- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我重新安装了Laravel 5.2(osx:10.11,php:5.6)。当我创建一个新的中间件(LocaleMiddleware.php)时,Laravel崩溃并显示以下信息:
Maximum function nesting level of '100' reached, aborting!
...
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\LocaleMiddleware::class, //<-- My Middleware
],
'api' => [
'throttle:60,1',
],
];
<?php
namespace App\Http\Middleware;
use Illuminate\Support\Facades\Session;
use Closure;
class LocaleMiddleware
{
/**
* Run the request filter.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next) {
// $language = Session::get('language');
// //print_r(Session::all());
// \App::setLocale($language, config('app.locale'));
return $next($request);
}
}
in Autoloader.php line 72
at FatalErrorException->__construct() in HandleExceptions.php line 133
at HandleExceptions->fatalExceptionFromError() in HandleExceptions.php line 118
at HandleExceptions->handleShutdown() in HandleExceptions.php line 0
at PHPExcel_Autoloader::Load() in ClassLoader.php line 0
at spl_autoload_call() in ClassLoader.php line 29
in ClassLoader.php line 412
at Composer\Autoload\includeFile() in ClassLoader.php line 301
at ClassLoader->loadClass() in Parser.php line 0
at spl_autoload_call() in Parser.php line 45
at Tokenizer->__construct() in Parser.php line 42
at Parser->__construct() in Translator.php line 78
at Translator->__construct() in CssSelectorConverter.php line 36
at CssSelectorConverter->__construct() in CssToInlineStyles.php line 20
at CssToInlineStyles->__construct() in ExcelServiceProvider.php line 111
at ExcelServiceProvider->Maatwebsite\Excel\{closure}() in Container.php line 731
at Container->build() in Container.php line 629
at Container->make() in Application.php line 697
at Application->make() in Container.php line 1178
at Container->offsetGet() in Container.php line 136
at ExcelServiceProvider->Maatwebsite\Excel\{closure}() in Container.php line 731
at Container->build() in Container.php line 629
at Container->make() in Application.php line 697
at Application->make() in Container.php line 1178
at Container->offsetGet() in Container.php line 151
at ExcelServiceProvider->Maatwebsite\Excel\{closure}() in Container.php line 731
at Container->build() in Container.php line 629
at Container->make() in Application.php line 697
at Application->make() in Container.php line 1178
at Container->offsetGet() in Container.php line 186
at ExcelServiceProvider->Maatwebsite\Excel\{closure}() in Container.php line 731
at Container->build() in Container.php line 629
at Container->make() in Application.php line 697
at Application->make() in Container.php line 1178
at Container->offsetGet() in Facade.php line 151
at Facade::resolveFacadeInstance() in Facade.php line 120
at Facade::getFacadeRoot() in Facade.php line 207
at Facade::__callStatic() in SubcategoryController.php line 19
at Excel::load() in SubcategoryController.php line 19
at SubcategoryController->start() in Controller.php line 80
at call_user_func_array:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:80}() in Controller.php line 80
at Controller->callAction() in ControllerDispatcher.php line 146
at ControllerDispatcher->call() in ControllerDispatcher.php line 94
at ControllerDispatcher->Illuminate\Routing\{closure}() in Pipeline.php line 52
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:52}() in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}() in Pipeline.php line 103
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103}() in Pipeline.php line 103
at Pipeline->then() in ControllerDispatcher.php line 96
at ControllerDispatcher->callWithinStack() in ControllerDispatcher.php line 54
at ControllerDispatcher->dispatch() in Route.php line 174
at Route->runController() in Route.php line 140
at Route->run() in Router.php line 724
at Router->Illuminate\Routing\{closure}() in Pipeline.php line 52
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:52}() in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}() in LocaleMiddleware.php line 22
at LocaleMiddleware->handle() in Pipeline.php line 136
at call_user_func_array:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:136}() in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 32
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:32}() in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}() in VerifyCsrfToken.php line 64
at VerifyCsrfToken->handle() in Pipeline.php line 136
at call_user_func_array:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:136}() in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 32
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:32}() in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}() in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle() in Pipeline.php line 136
at call_user_func_array:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:136}() in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 32
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:32}() in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}() in StartSession.php line 64
at StartSession->handle() in Pipeline.php line 136
at call_user_func_array:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:136}() in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 32
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:32}() in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}() in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle() in Pipeline.php line 136
at call_user_func_array:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:136}() in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 32
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:32}() in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}() in EncryptCookies.php line 59
at EncryptCookies->handle() in Pipeline.php line 136
at call_user_func_array:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:136}() in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 32
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:32}() in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}() in Pipeline.php line 103
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103}() in Pipeline.php line 103
at Pipeline->then() in Router.php line 726
at Router->runRouteWithinStack() in Router.php line 699
at Router->dispatchToRoute() in Router.php line 675
at Router->dispatch() in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http\{closure}() in Pipeline.php line 52
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:52}() in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}() in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle() in Pipeline.php line 136
at call_user_func_array:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:136}() in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}() in Pipeline.php line 32
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:32}() in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}() in Pipeline.php line 103
at call_user_func:{/Websites/Heuss/lheuss/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103}() in Pipeline.php line 103
at Pipeline->then() in Kernel.php line 132
at Kernel->sendRequestThroughRouter() in Kernel.php line 99
at Kernel->handle() in index.php line 54
at {main}() in index.php line 0
最佳答案
问题不在中间件中-查看堆栈,您的应用程序经过中间件并输入SubcategoryController
。看起来ExcelServiceProvider
的闭包中正在发生某些事情,因此请进行检查。
关于php - 创建新的中间件时,Laravel抛出: “Maximum function nesting level of ' 10 0' reached, aborting!”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42469646/
我是业余时间的 Java 开发者,我只是想知道 level.tick() 和 Level.tick(level) ('Level' 是类的名称,'level' 是该类的对象) 我知道,由于 java
在 asp.net MVC 中的 Level Views Level 或 Model level 中验证更明智 以及有关 MVC 中验证的良好教程的链接? 最佳答案 验证应始终在可能的情况下在客户端和
当使用随机数生成器时,为了使新值具有更大的随机性,这是更好的使用方式: 有没有一种每次都实例化一个新的 RNG 实例然后返回一个值的方法? 在类级别有一个 RNG 实例,它在构造函数中实例化一次,并且
我在理解“单一责任原则”时遇到问题。应该在类级别或方法级别应用SRP。 可以说我有学生类,我需要创建学生,更新学生和删除学生。 如果我创建一个具有用于这三个操作的方法的服务类,则会违反SRP原则。 最
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
这个问题与语言无关。枚举级别之间有什么区别。在应用程序中,我看到许多 INFO 消息对我来说似乎是 DEBUG 信息,反之亦然。 最佳答案 对此有多种不同的解释。我个人的看法是: 信息 - 与申请状态
似乎最好只为顶级函数创建一次 FunPtr,而不是在需要时创建一个新的函数(同一函数)并处理其释放。 除了 foreign import ccall "wrapper" 之外,我是否忽略了获取 Fun
我正在经历以下 link了解在依赖倒置原则的背景下高级和低级模块的含义。 根据那里给出的解释,以下代码片段是一个好的/合适的示例吗? public class HighLevel { priv
我很好奇在 Java 应用程序中执行 URL 重写的最佳方法是什么。假设您有一个名为 test_app 的应用程序,我将其部署在 tomcat 上。 通过 URL 重写,我的意思是我不想通过 host
我试图找到最有效的方法来检查给定的字符串是否为回文。 首先,我尝试了蛮力,其运行时间为 O(N)。然后我通过只进行 n/2 次比较而不是 n 次来稍微优化代码。 代码如下: def palindrom
我有一个包含一些随机自然数的表格,例如: number ------- 2 3 1 我想从这个表中检索一个集合,其中每一行都将包含与值显示的次数一样多的次数,例如上面它将是: number -----
我一直在了解测试驱动开发的优势,并尝试使用 pytest 开发我的第一个 TDD 应用程序和 setuptools 开发 选项。到目前为止进展顺利。我有一个问题:我的 test_* 模块中应该将要测试
我想将特定记录器名称、特定级别或更高级别(比如 INFO 及以上)的消息记录到特定的日志处理程序,比如文件处理程序,同时仍然获取所有日志消息到控制台。 Python 是 2.7 版。 到目前为止我尝试
DOM Level 0 事件与 DOM Level 2 事件有什么区别?我问是因为有人告诉我 Firefox 和 IE 以不同的顺序调用它们,而我以前从未听过这些术语。 最佳答案 DOM Level
其实我对token不是很了解..当我阅读 googleresearch/bert model 时,我看到了这些词。 # In the demo, we are doing a simple class
假设我们在站点中有一个页面,它显示了数据库中的一些记录。 我们需要显示按某列排序的记录。 哪种方法可以提供更好的性能:检索从数据库中排序的数据或在网格上应用排序? 谢谢 最佳答案 这取决于您要显示的数
其实我对token不是很了解..当我阅读 googleresearch/bert model 时,我看到了这些词。 # In the demo, we are doing a simple class
我有以下 CSS 下拉菜单标记: FieldOne LevelOne FieldTwo LevelOne FieldThree LevelOne
这个问题已经有答案了: What is the difference between DOM Level 0 events vs DOM Level 2 events? (2 个回答) 已关闭 9 年
如何通过搜索数组(第 2 级)中的重复值来删除一行数组(第 1 级)? $array = array( 0 => array('name' => 'haha1', 'dateline' => '
我是一名优秀的程序员,十分优秀!