mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 11:34:02 +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();
|
||||
|
||||
/** @var Domain|null $domain */
|
||||
$domain = $tenant ? $tenant->domains->first() : null;
|
||||
|
||||
if ($domain) {
|
||||
static::$currentDomain = $domain;
|
||||
if ($tenant) {
|
||||
static::$currentDomain = $tenant->domains->first();
|
||||
|
||||
return $tenant;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue