PHP 트레잇 HipsterJazzbo\Landlord\BelongsToTenants

파일 보기 프로젝트 열기: HipsterJazzbo/Landlord

보호된 프로퍼티들

프로퍼티 타입 설명
$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