Replies: 2 comments
-
I've never really tried that myself, but I know a few others are currently exploring it. There are a few questions on Discord already. Maybe someone will write a guide eventually. Maybe it could be you :) |
Beta Was this translation helpful? Give feedback.
-
I've got this working on an existing installation (in the process of replacing nova). I added this middleware: <?php
namespace App\Http\Middleware;
use Closure;
use Stancl\Tenancy\Middleware\InitializeTenancyBySubdomain;
class InitializeTenantByDomain extends InitializeTenancyBySubdomain
{
public function handle($request, Closure $next)
{
$host = $request->getHost();
// If the host is a central domain, we don't need to do anything.
if (collect(config('tenancy.central_domains'))->contains($host)) {
return $next($request);
}
return parent::handle($request, $next);
}
} To the Filament AdminPanelProvider (isPersisitent must be enabled for livewire to also be tenant aware) ...
->middleware([InitializeTenantByDomain::class], isPersistent: true)
... In tenancy.php config file I disabled the Hope this helps someone in the future! |
Beta Was this translation helpful? Give feedback.
-
Hi everyone!
I have a question regarding tenancy in v3.
Is it possible to have multi-database tenancy like in stancl/tenancy?
If it's possible, it would be nice to have documentation how to migrate a project from stancl/tenancy.
Regards
Beta Was this translation helpful? Give feedback.
All reactions