/vendor/autoload.php error while running laravel

You should have following code for autoload.php. Basically, you're trying to look for vendor directory in the public folder, whereas it is normally placed in the base directory

require __DIR__.'/../vendor/autoload.php';