我正在使用 000webhost 部署 laravel 但我收到错误

I am using 000webhost to deploy laravel but I am getting error

我正在尝试在 000webhost 上托管,但我一直收到此错误。我试过生成新的自动加载清除缓存。

编辑:清除路由缓存和配置缓存后压缩项目。然后就可以了

> Warning:
> require(/storage/ssd2/942/16963942/accidentmanagement/vendor/composer/../symfony/polyfill-php80/bootstrap.php):
> failed to open stream: No such file or directory in
> /storage/ssd2/942/16963942/accidentmanagement/vendor/composer/autoload_real.php
> on line 69 What should I do Warning:
> require(/storage/ssd2/942/16963942/accidentmanagement/vendor/composer/../symfony/polyfill-php80/bootstrap.php):
> failed to open stream: No such file or directory in
> /storage/ssd2/942/16963942/accidentmanagement/vendor/composer/autoload_real.php
> on line 69
> 
> Fatal error: require(): Failed opening required
> '/storage/ssd2/942/16963942/accidentmanagement/vendor/composer/../symfony/polyfill-php80/bootstrap.php'
> (include_path='.:/usr/share/pear:/usr/share/php') in
> /storage/ssd2/942/16963942/accidentmanagement/vendor/composer/autoload_real.php
> on line 69

运行 composer dump-autoload 在制作 zip 并将项目文件上传到主机之前,请确保在上传中包含 vendor 文件夹。

你必须打开laravel project

第一步:步骤

laravelProject\bootstrap\cache\config.php

重命名 config 文件

laravelProject\bootstrap\cache\config_old.php 

第二步:步骤

laravelProject\bootstrap\cache\routes-v7.php

重命名 routes 文件

laravelProject\bootstrap\cache\routes-v7_old.php

然后 运行 你的项目 运行 100%。