jeudi 31 mars 2016

Laravel 5 re-usable project

After some fiddling building a package for a project we've realised there's some issues with doing what we need to achieve as per Laravel 5 package development clarity

Maybe I should rather explain my goal and someone can suggest a direction to head in.

We've built a Laravel 5 application that now needs to be "re-used".

We had to modify Laravel and implement an Eloquent type base model as our data-source is actually C# Web Services. At the point the call would be made to a database we intercept this and make an "API" call to SOAP.

The major difference will be CSS, maybe some JS & content but all the routes/controllers/models will remain the same across all projects. Most configuration comes from endpoints.

Initially we considered creating multiple asset repositories for each site's styling and have a base repo which is the core Laravel project that gets included. This seemed to get quite complex as we couldn't simply just have a repo in a repo due to branching and multiple directory issues.

We then started experimenting with the idea of building the "core" as a Laravel package but we seem to constantly hit walls. The latest problem being including models in the package. For the models to be called we are using the root projects config/composer to access these models instead of just the service provider. It feels like the package is becoming to tightly coupled to the project config.

Are there any better ways of going about what we are trying to achieve?



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

Aucun commentaire:

Enregistrer un commentaire