I moved my project from desk to another.
When I run php artisan
it does not work.
I tried to run composer update
, but it returns the
I was upgrading my Laravel from 5.8 to 8.0
and I got this error.
So my fixes were
As @nobuhiroharada mentioned that I had missed .env
file in my project
Second is that Laravel removed Exception
and replaced it with Throwable
. So we need to fix that in our app\Exceptions\Handler.php
. One can refer Medium.com for the error fix.
In the upgrade guide of Laravel 8.x
you need to update the dependencies like this
Next, in your composer.json
file, remove classmap block from the autoload section and add the new namespaced class directory mappings:
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
bootstrap\cache
delete the cache files and run composer update
.These 5 steps might help you remove the error you are facing in your Laravel Project.