lundi 15 février 2016

How to put Laravel boilerplate in a directory

I am planning a SPA project using Vue and Laravel as JSON API. I'm toying with the idea of a folder structure like this:

public
 - index.php
MyProject
 - Component1
   - Model.php
   - Controller.php
   - ViewModel.js
   - views
     - index.txt
   - images
     - ...
   - styles.sass
Laravel
 - app
 - bootstrap
 - ...

Where the PHP models and controllers are hooked into Laravel, and non-php files are bundled and placed in the public directory.

I tried updating public/index.php, Laravel/app/bootstrap/app.php and Laravel/app/bootstrap/autoload.php to the correct paths, but now composer doesn't try to load classes from the Laravel directory.

Is there a correct strategy for using Laravel like this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire