mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 11:14:03 +00:00
Redundant variable '$domain', because $tenant is not null, only, when current domain is found and relationship is loaded (with only one domain).
This commit is contained in:
parent
3145d8330d
commit
1d3bb6dc27
1 changed files with 2 additions and 5 deletions
|
|
@ -42,11 +42,8 @@ class DomainTenantResolver extends Contracts\CachedTenantResolver
|
||||||
])
|
])
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
/** @var Domain|null $domain */
|
if ($tenant) {
|
||||||
$domain = $tenant ? $tenant->domains->first() : null;
|
static::$currentDomain = $tenant->domains->first();
|
||||||
|
|
||||||
if ($domain) {
|
|
||||||
static::$currentDomain = $domain;
|
|
||||||
|
|
||||||
return $tenant;
|
return $tenant;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue