I wanted to change the app.name
of my Laravel project, the new name had a space in it. Since the change of the name I get the PHP error:
PHP Fatal error: Uncaught ReflectionException: Class App\Console\Kernel does not exist in D:\xampp\htdocs\sistemas\selecao-geral\vendor\laravel\framework\src\Illuminate\Container\ Container.php:752
I now wish to revert the name back but this fails due too the above stated error.
How can I change back the app name, could I maybe do this manually?
Put the name in "quotes":
APP_NAME="Your App's Name"
And run:
php artisan config:clear
to clear the config cache.
Just ran into this problem today and I was able to fix it using these steps. Take note that this problem occurred because I've accidentally set the application "namespace" using the artisan command
php artisan app:name
instead of using the env variable APP_NAME to set the application name only
Using your IDE(in my case I'm using SublimeText3) search for the app namespace you've set (in my case I've set my namespace to TestApp) for all files inside your project. Make sure you match the whole word to be sure.
Replace the namespace to App (TestApp to App)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With