1
0
Fork 0
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:
lukinovec 2022-07-22 09:27:52 +02:00 committed by GitHub
commit 095c2e1380
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 556 additions and 123 deletions

View file

@ -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)
{

View file

@ -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',
];

View file

@ -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