mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 17:34:03 +00:00
Use nullsafe operator
This commit is contained in:
parent
c1679e6057
commit
44d6509691
2 changed files with 2 additions and 2 deletions
|
|
@ -128,7 +128,7 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
|
||||||
}
|
}
|
||||||
|
|
||||||
// Revert back to the previous tenant
|
// Revert back to the previous tenant
|
||||||
if (tenant() && $previousTenant && $previousTenant->isNot(tenant())) {
|
if (tenant() && $previousTenant?->isNot(tenant())) {
|
||||||
tenancy()->initialize($previousTenant);
|
tenancy()->initialize($previousTenant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ if (! function_exists('tenant')) {
|
||||||
return app(Tenant::class);
|
return app(Tenant::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
return optional(app(Tenant::class))->getAttribute($key) ?? null;
|
return app(Tenant::class)?->getAttribute($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue