This is equivalent to building your own custom CMS in laravel. This can be done but will require a lot of coding. For starters, you will need to build some sort of module system with the ability to swap modules on demand.
You will need to build ur templating system in such away as to allow overriding and inheriting (Inheriting already supported). So choosing the right template to load based on client will be a module. For an idea of how to do this look at this http://www.opencart.com/ . I is an open source shopping cart project and supports running multiple stores on one platform.
Open Cart should give u an idea on how to build and structure your project.
This task sounds like an adventure.
@ndy40 lol, it sure is an adventure.
I was hoping to more or less hot swap out the templates cased on what Domain is viewing the site. Middleware seemed like the rite place to start, but I think a service provider would be a better solution.
Along with Looks each site has access to multiple API sources that are all based off specific dealership criteria so its a little more involved that template hierarchy.
Seems like we are kind of on the same page. I'm building something similar to yours. Still having some head scratching moments...
Surely this is an adventure for me as well. :)
This is how i did it in Laravel 4.2. I built a SaaS sport management solution.
/public/ /public/global/js /public/global/images /public/global/css /public/site/customerA.com/js /public/site/customerA.com/images /public/site/customerA.com/css /public/site/customerB.com/js /public/site/customerB.com/images /public/site/customerB.com/css
and i used subdomain in the rotuer, and mapped to the folders.
The backend is the same for all customers with some data partition of course.
@extjac what did you do to map your subdomains to directories? Thats where I would like to start but I'm not sure if a service or middleware is what I need or something all together different.
Thanks!
L4.2 does not have middleware. But i did played with the router and Request::server('HTTP_HOST'). There a different ways to do it...And i think there are some packages for L5 If you are using the same DB..should not be a major issue. If you are planing to use different DB...that is another story... .
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community