来源:http ://www.wenda.io/questions/2416709/laravel-4-1-vendor-directory-config.html
编辑 composer.json
"config": {
"preferred-install": "dist",
"vendor-dir": "../vendor"
},
编辑 bootstrap/autoload.php 文件
require __DIR__.'/../../vendor/autoload.php'
编辑 bootstrap/start.php 文件
$framework = $app['path.base'].
'/../vendor/laravel/framework/src';
编辑 ../vendor/laravel/framework/src/Illuminate/Foundation/Console/Optimize/config.php
$basePath = $app['path.base'].'/../';
然后运行 composer install,你会发现 vendor dir created ../
php artisan optimize -v --force
生成优化的类加载器编译通用类