Php – Failed Opening autoload.php in Laravel 5

composer-phplaravellaravel-5PHP

I have recently installed Laravel via Composer but I keep get the following error:

Warning:
require(/home/leovoon/public_html/laravel-eee/bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
/home/leovoon/public_html/laravel-eee/bootstrap/autoload.php on line
17

Fatal error: require(): Failed opening required
'/home/leovoon/public_html/laravel-eee/bootstrap/../vendor/autoload.php'
(include_path='.:/opt/cpanel/ea-php71/root/usr/share/pear') in
/home/leovoon/public_html/laravel-eee/bootstrap/autoload.php on line
17

Am I missing something? Because I followed it step by step.

enter image description here

Best Answer

You got an error because you have missing vendor folder in your project, You need /vendor because all your packages are there, including all the classes Laravel uses. The vendor directory contains your Composer dependencies.

Your problem can be resolved after following this step. you can try it:

composer update --no-scripts 
composer update

With this command, you will re-create the vendor folder in your project and after that your project will start working normally.