phplaravelcomposer-php

Kernel does not exist in laravel


I have already developed project in laravel and i'm setting up it in my local computer but after running php artisan serve i'm getting this error

PHP Fatal error:  Uncaught ReflectionException: Class App\Console\Kernel does not exist in C:\xampp\htdocs\translate\vendor\laravel\framework\src\Illuminate\Container\Container.php:788

I don't know what is wrong but I have tried everything that I have found on internet

composer update
composer dump-autoload
composer self-update
php artisan config:clear
php artisan cache:clear

none of that command worked for me


Solution

  • You must run composer install for installing the new dependencies.

    Since you mentioned that you have issues with your other artisan commands delete everything inside the bootstrap->cache folder, except of the .gitignore file of course, manually and then run php artisan optimize

    That way your "corrupted" cache will be recreated and reconfigured.

    First thing you must do is to make sure your artisan commands are working right, so do the caching fix i suggest first. Then you can run the composer commands you mentioned also in your question.