mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 15:54:03 +00:00
refactor TenantDatabaseManagers
This commit is contained in:
parent
824292e6df
commit
d2e1ce0a1e
10 changed files with 52 additions and 126 deletions
|
|
@ -26,9 +26,7 @@ class DomainTenantResolver extends Contracts\CachedTenantResolver
|
|||
|
||||
/** @var Tenant|null $tenant */
|
||||
$tenant = config('tenancy.tenant_model')::query()
|
||||
->whereHas('domains', function (Builder $query) use ($domain) {
|
||||
$query->where('domain', $domain);
|
||||
})
|
||||
->whereHas('domains', fn (Builder $query) => $query->where('domain', $domain))
|
||||
->with('domains')
|
||||
->first();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue