Support the ongoing development of Laravel.io →
Packages Architecture
Last updated 2 years ago.
0

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.

0

@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.

0

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. :)

0

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.

Last updated 8 years ago.
0

@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!

0

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... .

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.