BindingResolutionException Target class [hash] does not exist after deploy

Viewed 629

I wanted to deploy my laravel 8.0 project via ssh pull to production. I did composer update in ssh to my ubuntu server and after that my website is down and showing 500 error.

when I turn on debug mode in production it shows below error:

Target class [hash] does not exist.

enter image description here

my website worked well before pull and composer update and after that this happened.

also there is no problem in local environment and it works properly.

my .env file in production also exists and the details are set.

I have tried lots of ways for resolving the error but none of these works:

  1. changing permisions for bootstrap and also for the whole project :

    sudo chgrp -R www-data storage bootstrap/cache

    sudo chmod -R ug+rwx storage bootstrap/cache

  2. removing and reverting bootstrap folder

  3. composer dump-autoload

  4. php artisan config:cache

  5. composer update and sudo composer update

I also tried these commands but none of them worked:

php artisan route:clear

php artisan view:clear

php artisan config:cache

php artisan cache:clear

php artisan config:clear

I've searched alot and tried many ways but no result. could any one say what is wrong please? thanks alot.

0 Answers
Related