PHP Трейт HipsterJazzbo\Landlord\BelongsToTenants

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$landlord TenantManager

Открытые методы

Метод Описание
allTenants ( ) : Builder Returns a new query builder without any of the tenant scopes applied.
bootBelongsToTenants ( ) Boot the trait. Will apply any scopes currently set, and register a listener for when new models are created.
findOrFail ( mixed $id, array $columns = ['*'] ) : Illuminate\Database\Eloquent\Collection | Model Override the default findOrFail method so that we can re-throw a more useful exception. Otherwise it can be very confusing why queries don't work because of tenant scoping issues.
getTenantColumns ( ) : array Get the tenantColumns for this model.

Описание методов

allTenants() публичный статический Метод

$allUsers = User::allTenants()->get();
public static allTenants ( ) : Builder
Результат Illuminate\Database\Eloquent\Builder

bootBelongsToTenants() публичный статический Метод

Boot the trait. Will apply any scopes currently set, and register a listener for when new models are created.
public static bootBelongsToTenants ( )

findOrFail() публичный статический Метод

Override the default findOrFail method so that we can re-throw a more useful exception. Otherwise it can be very confusing why queries don't work because of tenant scoping issues.
public static findOrFail ( mixed $id, array $columns = ['*'] ) : Illuminate\Database\Eloquent\Collection | Model
$id mixed
$columns array
Результат Illuminate\Database\Eloquent\Collection | Illuminate\Database\Eloquent\Model

getTenantColumns() публичный Метод

Get the tenantColumns for this model.
public getTenantColumns ( ) : array
Результат array

Описание свойств

$landlord защищенное статическое свойство

protected static TenantManager,HipsterJazzbo\Landlord $landlord
Результат TenantManager