Tenant
class Tenant extends Model implements Tenant (View source)
Traits
Extends VirtualColumn for backwards compatibility. This trait will be removed in v4.
VirtualColumn
Properties
static | $resolvers | from InvalidatesResolverCache | |
static protected | $modelsShouldPreventAccessingMissingAttributes | ||
protected | $table | ||
protected | $primaryKey | ||
protected | $guarded | ||
protected | $dispatchesEvents | ||
string|int | $id | ||
Carbon | $created_at | ||
Carbon | $updated_at | ||
array | $data |
Methods
string
getTenantKeyName()
Get the name of the key used for identifying the tenant.
getTenantKey()
Get the value of the key used for identifying the tenant.
newCollection(array $models = [])
No description
static TenantCollection
all(mixed $columns)
No description
Details
getConnectionName()
No description
static
bootGeneratesIds()
No description
getIncrementing()
No description
bool
shouldGenerateId()
No description
getKeyType()
No description
static string
internalPrefix()
Get the internal prefix.
getInternal(string $key)
Get an internal key.
setInternal(string $key, $value)
Set internal key.
mixed
run(callable $callback)
Run a callback in this tenant's context.
Atomic, safely reverts to previous context.
static
bootInvalidatesResolverCache()
No description
string
getTenantKeyName()
Get the name of the key used for identifying the tenant.
getTenantKey()
Get the value of the key used for identifying the tenant.
TenantCollection
newCollection(array $models = [])
No description
static TenantCollection
all(mixed $columns)
No description