简体   繁体   中英

Implementing Multi-tenancy in Laravel

I am using Laravel 5.4 with having Laravel Voyager Installed.

The main requirements of the project are to have the multi-tenant domain based application ie app.com and {client}.app.com

I have been trying to load configurations based on a subdomain and will act subdomain as the client code which worked fine on localhost but while I am pushing changes to live server things are not working

As a beginner in this scope, I am not sure how thing will work on the live environment, in terms of domain redirection and setting up options in middleware, or mainly how wildcard subdomain would work in laravel's subdomain routing

You can use this package: https://github.com/hyn/multi-tenant

I've used this many times and can confirm it works extremely well. As an added bonus, there's a very detailed tutorial you can use to get going here:https://laravel-tenancy.com/docs/hyn/5.x/full-featured-tutorial

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM