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

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.

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

all(mixed $columns)

No description

Details

getConnectionName()

No description

static bootGeneratesIds()

No description

getIncrementing()

No description

bool shouldGenerateId()

No description

Return Value

bool

getKeyType()

No description

static string internalPrefix()

Get the internal prefix.

Return Value

string

getInternal(string $key)

Get an internal key.

Parameters

string $key

setInternal(string $key, $value)

Set internal key.

Parameters

string $key
$value

mixed run(callable $callback)

Run a callback in this tenant's context.

Atomic, safely reverts to previous context.

Parameters

callable $callback

Return Value

mixed

static bootInvalidatesResolverCache()

No description

string getTenantKeyName()

Get the name of the key used for identifying the tenant.

Return Value

string

getTenantKey()

Get the value of the key used for identifying the tenant.

TenantCollection newCollection(array $models = [])

No description

Parameters

array $models

Return Value

TenantCollection

static TenantCollection all(mixed $columns)

No description

Parameters

mixed $columns

Return Value

TenantCollection