Property | Type | Description | |
---|---|---|---|
$enabled | boolean | ||
$tenants |
Method | Description | |
---|---|---|
__construct ( ) | Landlord constructor. | |
addTenant ( string | |
Add a tenant to scope by. | |
applyTenantScopes ( |
Applies applicable tenant scopes to a model. | |
disable ( ) : void | Disable scoping by tenantColumns. | |
enable ( ) : void | Enable scoping by tenantColumns. | |
getTenants ( ) : |
||
hasTenant ( string | |
Whether a tenant is currently being scoped. | |
newModel ( |
Add tenant columns as needed to a new model instance before it is created. | |
newQueryWithoutTenants ( |
Get a new Eloquent Builder instance without any of the tenant scopes applied. | |
removeTenant ( string | |
Remove a tenant so that queries are no longer scoped by it. |
Method | Description | |
---|---|---|
getTenantKey ( string | |
Get the key for a tenant, either form a Model instance or a string. | |
modelTenants ( |
Get the tenantColumns that are actually applicable to the given model, in case they've been manually specified. |
public applyTenantScopes ( |
||
$model |
protected getTenantKey ( string | |
||
$tenant | string | |
|
return | string |
protected modelTenants ( |
||
$model | ||
return |
public newModel ( |
||
$model |
public newQueryWithoutTenants ( |
||
$model | ||
return |
public removeTenant ( string | |
||
$tenant | string | |