Route.php类Controller中的ReflectionException不存在

Bul*_*god 6 laravel laravel-5 laravel-5.2

我在centos 5.8服务器中使用Laravel 5.2并收到以下错误:

ReflectionException in Route.php line 280:
Class xxxx\Http\Controllers\CpanelController does not exist


ErrorException in ClassLoader.php line 412: include(/home/xxxx/vendor/composer/../../app/Http/Controllers/CpanelController.php): failed to open stream: Permission denied
Run Code Online (Sandbox Code Playgroud)

我正在尝试:

php artisan cache:clear

chmod -R 777 storage

composer dump-autoload

但问题仍然存在

Adn*_*taz 0

当 Laravel 找不到 String 中指向的类时,会发生反射异常。

有一些要点需要记住。

  1. 确保您尝试访问的类中有正确的名称空间。
  2. 检查控制器文件的大小写。大小写在 WINDOWS 中无关紧要,但在 Linux/CentOS 中不起作用。
  3. 跑步composer update
  4. 给整个目录的权限为 777,文件的权限为 644