ReflectionException in controller of class Route.php does not exist

I am using Laravel 5.2 on centos 5.8 server and getting the following error:

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 

I'm trying to:

php artisan cache:clear

chmod -R 777 storage

composer dump-autoload

But the problem persists

+6
laravel laravel-5
source share
1 answer

Laravel Throughs Reflection Exception if it does not find the class that is specified in String.

There are several points to remember.

  • Make sure you have the correct namespace in your class that you are trying to access.
  • Check the upper and lower case of the controller file. Upper case and lower case do not matter in WINDOWS, but it will not work on Linux / CentOS.
  • run composer update
  • grant permission to all directories since 777 and file have 644
0
source share

All Articles