简体   繁体   中英

After git clone on Laravel 5.0 project get php warning

i have a git server and pushed my laravel 5.0 project files to repository 3 days ago. and working correctly. when i want to get this repository from another client, i get files but when i ran the codes PHP say this message:

PHP Warning: require(/var/www/html/laravel-egitim-project/laravel/vendor/illuminate/html/helpers.php): failed to open stream: No such file or directory in /var/www/html/laravel-egitim-project/laravel/vendor/composer/autoload_real.php on line 54

PHP Stack trace:

PHP 1. {main}() /var/www/html/laravel-egitim-project/laravel/artisan:0

PHP 2. require() /var/www/html/laravel-egitim-project/laravel/artisan:16

PHP 3. require() /var/www/html/laravel-egitim-project/laravel/bootstrap/autoload.php:17

PHP 4. ComposerAutoloaderInit87ba45c9c5ba3d6c32615e4101d8a2a6::getLoader() /var/www/html/laravel-egitim-project/laravel/vendor/autoload.php:7

PHP 5. composerRequire87ba45c9c5ba3d6c32615e4101d8a2a6() /var/www/html/laravel-egitim-project/laravel/vendor/composer/autoload_real.php:45

PHP Fatal error:

require(): Failed opening required '/var/www/html/laravel-egitim-project/laravel/vendor/illuminate/html/helpers.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/laravel-egitim-project/laravel/vendor/composer/autoload_real.php on line 54

PHP Stack trace:

PHP 1. {main}() /var/www/html/laravel-egitim-project/laravel/artisan:0

PHP 2. require() /var/www/html/laravel-egitim-project/laravel/artisan:16

PHP 3. require() /var/www/html/laravel-egitim-project/laravel/bootstrap/autoload.php:17

PHP 4. ComposerAutoloaderInit87ba45c9c5ba3d6c32615e4101d8a2a6::getLoader() /var/www/html/laravel-egitim-project/laravel/vendor/autoload.php:7 PHP 5. composerRequire87ba45c9c5ba3d6c32615e4101d8a2a6() /var/www/html/laravel-egitim-project/laravel/vendor/composer/autoload_real.php:45

How to solve this problem?

Delete vendor folder and composer.lock file. Now run composer install and upload complete code to the server.

用大写字母H将Helper / helper.php文件名更改为Helper.php,它应该可以工作

I did work on the Bitbucket and Laravel.

The day when I pushed my Laravel project to bitbucket I found that Vendor folder was missing in bitbucket.

When we try to pull the same project somewhere else's machine, then Vendor folder is missing in our Laravel project.

And if you try to run the project, you will get tons of error messages.

Make sure you add Vendor folder again to the downloaded Laravel project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM