mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 23:24:03 +00:00
Merge branch 'master' into stein-j-readied-tenant
This commit is contained in:
commit
095c2e1380
55 changed files with 556 additions and 123 deletions
|
|
@ -11,9 +11,6 @@ trait TenantRun
|
|||
/**
|
||||
* Run a callback in this tenant's context.
|
||||
* Atomic, safely reverts to previous context.
|
||||
*
|
||||
* @param callable $callback
|
||||
* @return mixed
|
||||
*/
|
||||
public function run(callable $callback)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,10 +22,15 @@ class ImpersonationToken extends Model
|
|||
use CentralConnection;
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $primaryKey = 'token';
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $table = 'tenant_user_impersonation_tokens';
|
||||
|
||||
protected $dates = [
|
||||
'created_at',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ class Tenant extends Model implements Contracts\Tenant
|
|||
Concerns\HasPending;
|
||||
|
||||
protected $table = 'tenants';
|
||||
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function getTenantKeyName(): string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue