mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 09:04:03 +00:00
Improved query for resolving domain
The tenant relation is instantly called 100% of the times this method is called. Including the tenant relation, we are saving an additional database query.
This commit is contained in:
parent
dc32fee8f4
commit
09d883f29a
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ class DomainTenantResolver extends Contracts\CachedTenantResolver
|
|||
public function resolveWithoutCache(...$args): Tenant
|
||||
{
|
||||
/** @var Domain $domain */
|
||||
$domain = config('tenancy.domain_model')::where('domain', $args[0])->first();
|
||||
$domain = config('tenancy.domain_model')::with('tenant')->where('domain', $args[0])->first();
|
||||
|
||||
if ($domain) {
|
||||
static::$currentDomain = $domain;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue