mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:54:04 +00:00
Add and test Tenant::current()
This commit is contained in:
parent
76a3e269c8
commit
0198a30413
2 changed files with 17 additions and 0 deletions
|
|
@ -45,6 +45,11 @@ class Tenant extends Model implements Contracts\Tenant
|
|||
return $this->getAttribute($this->getTenantKeyName());
|
||||
}
|
||||
|
||||
public static function current(): Tenant|null
|
||||
{
|
||||
return tenant();
|
||||
}
|
||||
|
||||
public function newCollection(array $models = []): TenantCollection
|
||||
{
|
||||
return new TenantCollection($models);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue