Reputation: 105
i'm have worked with laravel 3 in the past and used a project structure where multiple apps could use one installation of the framework. now in laravel 4 i am concered if that is still possible. since the bootstrap/autoload.php
file requires the vendor/autoload.php
file (and so on...), different apps have to use the same autoload files from within the vendor directory, right? i think this would be a big performance problem because the different apps maybe have different requirements, different models to work with and so on. am i thinking right or is there a chance to use one /vendor/
installation for multiple apps without the need to share the autoload files?
to explain my needs: i would like to run different apps (every app with another domain & home directory) which share one database and some models. but the requirements of every app will be very different.
is there any solution? i tried this since the release but found no practicable way.
Upvotes: 7
Views: 4281
Reputation: 2676
How about modifying bootstrap/autoload.php
and vendor/autoload.php
to load autoload stuff per project to some kind of sub-directory structure under vendor/composer/
.
Not sure, how to change composer to generate that kind of project specific autoload directories. Maybe it needs changing composer?
Upvotes: 1
Reputation: 678
Have you tried http://laravel.com/docs/routing#sub-domain-routing?
You could create a route group and assign a filter function to that route group to do specific autoloads?
Upvotes: 1