- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 之后,我已将我的网站从 Laravel 5.8 迁移到 Laravel 6 Composer 更新 我在网站上有这个错误,也只有一个命令 php工匠 :
PHP Fatal error: Uncaught RuntimeException: A facade root has not been set. in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:242
Stack trace:
#0 /var/www/html/app/Exceptions/Handler.php(48): Illuminate\Support\Facades\Facade::__callStatic('check', Array)
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(376): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(141): Illuminate\Foundation\Console\Kernel->reportException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#3 /var/www/html/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 {main}
thrown in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 242
Fatal error: Uncaught RuntimeException: A facade root has not been set. in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:242
Stack trace:
#0 /var/www/html/app/Exceptions/Handler.php(48): Illuminate\Support\Facades\Facade::__callStatic('check', Array)
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(376): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(141): Illuminate\Foundation\Console\Kernel->reportException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#3 /var/www/html/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 {main}
thrown in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 242
最佳答案
我知道,答案有点晚了 :) 但我仍然相信它可以帮助遇到此问题的其他人。
全部更换str_slug()
方法来自 Str::slug()
解决问题。
就我而言,我在 config/cache.php
中找到了老 helper 。和 config/session.php
文件。
关于php - Laravel 6 : A facade root has not been set,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59084991/
据我了解,立面图案的意图是 to provide a unified interface to a set of interfaces in a subsystem. Facade defines a
在我的独立(没有 Laravel)项目中,我想使用 Illuminate IoC 容器。我还想通过 illuminate/support 组件提供的 App facade 访问应用程序容器。我安装了这
我正在尝试制作一个简单的订购系统,因为这是一项作业,所以它是我不应该制作数据库和图形用户界面的界限,但我需要实现至少 4 个设计模式。我的决定之一是使用 Facade。据我了解,Facade 类是一种
概述 外部与内部子系统通信时必须通过的一个统一的外观模式对象进行,就是外观模式,也称门面模式。一般而言,Facade模式是为了降低客户端与实现化层之间的依赖性。外观模式的用意是为子系统提供一个集中
假设我们在 Laravel 中有以下类 class myClass { private $_someArray; // Functions to manipulate $_someAr
我的程序中的许多业务逻辑服务需要访问一组通用的非业务逻辑服务,例如电子邮件、打印、消息传递(消息框和提示)和日志记录。我计划创建一个外观来封装 EmailService、PrintService、Me
我经常看到有人这样使用门面。 public class FooFacade { Foo foo; public boolean isFunny(param1, param2) {
我的代码可以正常工作,但我不知道我的实现方式是否合适。基本上,我想保持模式而不违反它。 代码如下所示: 包模型(省略了 setter/getter): public class CA { pr
外观模式应该是程序员最下意识用的一种模式,比如我们习惯性的对复杂系统做一个封装接口。外观模式其本质是对一堆复杂对象和应用的接口抽象,对它们进行封装隔离,对于调用者来说只需要关系接口的实现,而不需要知
模式定义:外观模式(Facade Pattern):外部与一个子系统的通信必须通过一个统一的外观对象进行,为子系统中的一组接口提供一个一致的界面,外观模式定义了一个高层接口,这个接口使得这一子系统更
外观模式(Facade Pattern)隐藏系统的复杂性,并向客户端提供了一个客户端可以访问系统的接口 外观模式涉及到一个单一的类,该类提供了客户端请求的简化方法和对现有系统类方法的委托调用 外观
在处理我的第一个 laravel 包时遇到了我的 Facade 工作方式的问题,目前我的使用看起来像这样: {!! Custom::showValue() !}} //returns "default
我正在尝试使用配置 Controller 在 Laravel 7 中更改我的应用程序语言环境: class ConfigController extends Controller { /**
我有一个类(class)叫 Awesome并使用了 ServiceProvider和 Facade将其注册到应用程序。现在我可以将它用作 Awesome::Things() . 我想在这个类中添加常量
我们团队中的另一个人为我提供了一个库作为他的 Web 框架的 jar。我们将此框架称为“我 friend 的框架”。 我需要从他的框架中获取一个特定的类。该类公开的属性中有一半是我自己的应用程序真正需
我正在创建一个无状态 session bean(外观),它将用于“管理”特定实体,我们将其称为产品。将有添加新产品、更新现有产品、获取产品等的方法(我使用 Hibernate 进行持久化,因此我有一个
几年前,有人告诉我在单独的 .cs 文件中实现业务逻辑代码,尽管这些文件包装了相同的部分类。因此可以像这样从业务层调用方法: using(FooPartialDisposableClass parti
假设我的 Facade 类有两个子系统类。每个子系统都有不同的事件。 FacadeClass 是 public class FacadeClass { private SubsystemCla
我想知道这两种模式之间有什么区别。 我可能错了,但他们似乎在使用相同的结构来为更大的代码体实现更高级别的接口(interface)。 门面模式: var mobileEvent = { // ..
我写了一个任务管理器,好吧;说来话长……顺便说一句,全部用 Java 编写。所以我写了一个门面,你可以在下面看到 HashMap 有问题,我怀疑我在构建过程中尝试添加到 HashMap 中的值不太顺利
我是一名优秀的程序员,十分优秀!