我正在尝试在应用程序中使用Toastr
程序包来向用户显示警报。我遵循了教程here,但是现在我无法访问我的应用程序;我遇到此错误:
Fatal error: Uncaught RuntimeException: A facade root has not been set. in C:\xampp\htdocs\MonProjet\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:234 Stack trace: #0 C:\xampp\htdocs\MonProjet\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php(397): Illuminate\Support\Facades\Facade::__callStatic('replaceNamespac...', Array) #1 C:\xampp\htdocs\MonProjet\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php(374): Illuminate\Foundation\Exceptions\Handler->registerErrorViewPaths() #2 C:\xampp\htdocs\MonProjet\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php(289): Illuminate\Foundation\Exceptions\Handler->renderHttpException(Object(Symfony\Component\HttpKernel\Exception\HttpException)) #3 C:\xampp\htdocs\MonProjet\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php(188): Illuminate\Foundation\Exceptions\Handler->prepareResponse(Object(Illuminate\Http\Request), Object(Symfony\Component\HttpKernel\Exception\HttpExcepti in C:\xampp\htdocs\MonProjet\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 234
对这个问题有何想法?我已按照步骤操作,但出现此错误。那里怎么了..?
答案 0 :(得分:0)
您的问题不清楚。请详细说明, 您可以在渲染前添加@。例:- @toastr()-> render();