使用Laravel Chatter时出现“Class web does not exist”错误。

4

我最近将我的应用程序从Laravel 5.1更新到了5.3。

在此之后不久,我尝试安装 chatter。

我按照这里的说明进行操作:https://github.com/thedevdojo/chatter

除了将yield添加到 master.blade.php(我没有这个文件),我将它们添加到 templates/default.blade.php 中(本质上是相同的)。

按照所有步骤后,我去检查 localhost/forums 页面,但却返回了以下错误:

ReflectionException in Container.php line 749: 

Class web does not exist

这是什么原因引起的?


1
谷歌显示这个问题已经在Laracasts上得到了解答。 - Joe Niland
1个回答

10

请确保您的 app/Http/Kernel.php 文件中包含 $middlewareGroups
如果没有,请在 app/Http/Kernel.php 的第 28 行添加它。 如果已经存在,请确保其正确闭合。

\Illuminate\Routing\Middleware\SubstituteBindings::class,
web 中。
你还应该检查并添加

'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
$routeMiddleware数组中。 https://laravel.com/docs/5.3/upgrade#upgrade-5.3.0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接