You need to change following files for a different vendor directory location:
artisan
public/index.php
composer.json
For example, wherever you find following (in case of artisan file):
require __DIR__.'/vendor/autoload.php';
replace with:
require __DIR__.'/php_modules/vendor/autoload.php';
Wherever you find following (in case of public/index.php):
require __DIR__.'/../vendor/autoload.php';
replace with:
require __DIR__.'/../php_modules/vendor/autoload.php';
In composer.json file, look for following fields:
autoload -> exclude-from-classmap
scripts -> test
config -> vendor-dir
Check these above 3 fields in composer.json file and correct the values appropriately.
Thanks (and waiting for more replies/suggestions)