@sam9 Use Laravel’s sub-domain routing: https://laravel.com/docs/master/routing#route-group-sub-domain-routing
White Label Solution for a Laravel Application?
Using Laravel v5.2, MySql, Forge, Ubuntu 16, nginx, .
I want to create a white label solution for my laravel application which maintains user's (clients) projects and some stats for those projects.
There is also a concept of Parent user, so a user may belong to some other user and there can be only one parent user.
Lets call the parent user as "Agency". So the users those belong to a Parent User will be treated as his clients, clients of that Agency.
All the DB data management and computation for separating the agency data from the whole is done.
The problem is:
- each agency will have its own sub-domain name for their admin and client's login and other pages.
Say the application opens from www.myapp.com; and "apple" and "orange" are two agencies, so they should be able to access the same application using their sub-domain urls like: www.apple.myapp.com and www.orange.myapp.com
So how to make any sub-domain access the same application?
-
The url should always show the agency's sub-domain url for every page.
-
They still be accessing the same laravel app from those sub-domain urls. How to know the user is logged in from the agency's sub-domain url?
The data presented to them will be handled by the application logic, as an agency can see the data that belongs to their child users only.
Please or to participate in this conversation.