i found the solve for this business model by using multi-tenant and used this package to do multi-tenant in my application https://tenancyforlaravel.com/ and if u like to do the multi-tenant without packages see this tutorial https://www.youtube.com/watch?v=592EgykFOz4 (by mohamed said)
Pushing feature update and Control all my websites
I creating a Saas eCommerce using Laravel like Shopify. (multi stores with different plans with it's different features
i have faced 2 things didn't knew how i can do it
First if i added a new feature or fixed a bug , How i can send an update to all users ?
Second how i can mange all user . ex. upgrade a plan for user or disable/active a feature for him ?
First if i added a new feature or fixed a bug , How i can send an update to all users ?
@muhammednasser Usually with multi-tenancy, you have one codebase that is used to serve multiple customers. This is the very definition of software-as-a-service. So you would do a feature or bug fix, and deploy that, and then all customers using your platform will benefit from that feature/bug fix.
how i can mange all user . ex. upgrade a plan for user or disable/active a feature for him ?
It depends if you want to save records in the same database, or go with this bizarre, database-per-tenant approach that everyone seems to think you need. But Shopify have like, a million customers. A severely doubt they have 1,000,000 MySQL instances that they’re maintaining, running migrations against, etc. So just keep things in a single database and use foreign keys. That way, a user can use the same account to access multiple stores if they want to.
If you get to the point where you have a million customers yourself, then you’ll be hiring people who know how to scale, properly shard your database for performance, etc. But don’t worry about that sort of scale until you reach it. Too many people worry about “what if” scenarios instead of just building. I’m pretty sure Mark Zuckerberg wasn’t worrying about scaling for a billion users when he started knocking out PHP code for Facebook.
Please or to participate in this conversation.