Multi Tenancy
Hi! I'm new to Wave, i also have subscribed the proplan and digging inside wave to make my own saas application. I have eperience with winter cms developing and i found it's quite similar.
But i need to implement a multi tenancy in order to have one subdomain for each subscriber.
Can someone has implemented a thing like this? Thanks
Hi there,
Wave uses Voyager as its admin panel. As of the time being, this is something that Voyager does not offer out of the box.
However there is a work around that you could follow here:
How to apply multi-tenancy in Laravel Voyager
Hope that this helps!
Best,
Bobby
I found this guide today, need to try. Partially solve but I need to create subdomains per user
That should not be a problem, you could just use the standard Laravel subdomain routing functionality:
Subdomains may be assigned route parameters just like route URIs, allowing you to capture a portion of the subdomain for usage in your route or controller. The subdomain may be specified by calling the domain method before defining the group:
Route::domain('{account}.example.com')->group(function () {
Route::get('user/{id}', function ($account, $id) {
//
});
});
In order to ensure your subdomain routes are reachable, you should register subdomain routes before registering root domain routes. This will prevent root domain routes from overwriting subdomain routes that have the same URI path.
For more information you could check out the docs here:
Let me know if you have any questions!
thank you @bobby, i will investigate this!
Ok, solved (in my dev env made with ddev) with this piece of code
Route::group(array('domain' => '{subdomain}.mysite.ddev.site'), function () {
Route::get('/', function ($subdomain) {
$name = DB::table('users')->where('username', $subdomain)->get();
return $name;
});
});

















That is great! Happy to hear that you've got it working!