php - 如何解决我的问题?请帮助我。我想将我的 laravel 项目 5.2 升级到 7。但是作曲家返回这个问题
问题描述
PHP Fatal error: Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php:809
Stack trace:
#0 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php(809): ReflectionClass->__construct('App\\Exceptions\\...')
#1 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php(691): Illuminate\Container\Container->build('App\\Exceptions\\...')
#2 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(796): Illuminate\Container\Container->resolve('App\\Exceptions\\...', Array, false)
#3 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php(269): Illuminate\Foundation\Application->resolve('App\\Exceptions\\...', Array, false)
#4 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php(805): Illuminate\Con in G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 811
PHP Fatal error: Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php:809
Stack trace:
#0 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php(809): ReflectionClass->__construct('App\\Exceptions\\...')
#1 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php(691): Illuminate\Container\Container->build('App\\Exceptions\\...')
#2 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(796): Illuminate\Container\Container->resolve('App\\Exceptions\\...', Array, false)
#3 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php(269): Illuminate\Foundation\Application->resolve('App\\Exceptions\\...', Array, false)
#4 G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php(805): Illuminate\Con in G:\xampp\htdocs\shomoynews_dynamic\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 811
解决方案
Looks like - for whatever reason - your Exception handler is missing. It should be in app/Exceptions/Handler.php
. If it's there, you might have an autoload issue.
If not, it looks like you unintentionally deleted it. You can find the source file (of version 7.x) here:
https://github.com/laravel/laravel/blob/7.x/app/Exceptions/Handler.php
Insert that file to your code.
推荐阅读
- vscode-remote - 从用户A切换到用户B
- python - 如何编写一个或条件来以 Python 方式检查子字符串?
- ant - 如何使用ant中的scp任务一次将不同目录中的多个文件从本地机器复制到远程机器?
- javascript - 在 SCSS 中动态堆叠图像
- javascript - 跨 react-table 实现全局搜索过滤器:React+ react-table
- python - 使用 Python 读取 Cassandra 时获取 dict 而不是 OrderedMapSerializedKey
- sparql - 从 dbpedia 查询中仅返回标签列和人口
- c# - 如何在 Entity Framework Core 中限制链接实体
- javascript - 在模板文字 JS 内循环
- xamarin - 无法导航到之前调用过的页面