mercredi 2 septembre 2015

Laravel 5.X one instance multiple app

I am looking to set up one instance of laravel and run multiple apps. Each app would have it's own namespace with custom routes,config, assets, views and its owncomposer.json. All apps will share the same vendor file. This is what I have done so far. Created multiple namespaces, and that's how each app directory structure look like

 |--app
    |--App1
       |-- app
       |-- Bootstrap
       |-- config
       |-- database 
       |-- public
       |-- resources
       |-- storage
       |-- ..  
       |-- composer.json
    |-- App2
       |--..
 |--vendor

to resolve the vendor dependencies I change the vendor folder location in composer.json likes this

"config": {
    "preferred-install": "dist",
    "vendor-dir":"../vendor"
}

I also updated the vendor path in autoload.php to point to the correct location.

The env where I am setting up this project, also runs other laravel projects. So all the ingredients are there(htaccess,, vhosts, ....).

When I ran composer dump-autoload, everything loads I get no errors. When I navigate to my route, I get a blank page. App debug is set to true. I am able to dd($app) from app.php. see results here pastebin

Is my approach to set up laravel in this fashion correct? if so where did I go wrong or what am I doing wrong.
Thanks a lot in advance.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Us1WL3
via IFTTT

Aucun commentaire:

Enregistrer un commentaire