mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 22:24:03 +00:00
Merge branch 'archtechx:3.x' into 3.x
This commit is contained in:
commit
54d832651f
2 changed files with 3 additions and 3 deletions
|
|
@ -28,6 +28,8 @@ class Tenant extends Model implements Contracts\Tenant
|
||||||
Concerns\TenantRun,
|
Concerns\TenantRun,
|
||||||
Concerns\InvalidatesResolverCache;
|
Concerns\InvalidatesResolverCache;
|
||||||
|
|
||||||
|
protected static $modelsShouldPreventAccessingMissingAttributes = false;
|
||||||
|
|
||||||
protected $table = 'tenants';
|
protected $table = 'tenants';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,7 @@ abstract class CachedTenantResolver implements TenantResolver
|
||||||
|
|
||||||
$key = $this->getCacheKey(...$args);
|
$key = $this->getCacheKey(...$args);
|
||||||
|
|
||||||
if ($this->cache->has($key)) {
|
if ($tenant = $this->cache->get($key)) {
|
||||||
$tenant = $this->cache->get($key);
|
|
||||||
|
|
||||||
$this->resolved($tenant, ...$args);
|
$this->resolved($tenant, ...$args);
|
||||||
|
|
||||||
return $tenant;
|
return $tenant;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue