1
votes

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?

3
i try to "composer update" console return me similar error like this: "Script php artisan clear-compiled handling the pre-update-cmd event returned with an error [RuntimeException] Error Output: PHP Warning: require(/var/www/html/laravel-egitim-project/laravel/vendor/illuminate/html/he lpers.php): failed to op ........" - Mesuti
Keep in mind that pushing a git project to a server (and subsequently cloning it to a new one) copies everything except what is in your .gitignore folder. By default, everything in your /vendor folder is ignored, so you have to run composer install after cloning, which will create the /vendor folder and fill it accordingly. If you manually added something to the /vendor folder, you have to either manually add it again or specify to not-ignore it. - Tim Lewis

3 Answers

2
votes

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

0
votes

Change the Helper/helper.php file name to Helper.php with Capital H, it should work

0
votes

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.