PHP 트레잇 Silber\Bouncer\Database\IsRole

상속: use trait HasAbilities, use trait Authorizable
파일 보기 프로젝트 열기: JosephSilber/bouncer

공개 메소드들

메소드 설명
assignTo ( string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) Assign the role to the given model(s).
getClipboardInstance ( )
retractFrom ( string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) Retract the role from the given model(s).
scopeWhereAssignedTo ( Builder $query, string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) : void Constrain the given query to roles that were assigned to the given authorities.
users ( ) : Illuminate\Database\Eloquent\Relations\MorphedByMany The users relationship.

보호된 메소드들

메소드 설명
createAssignRecords ( Model $model, array $keys ) : array Create the pivot table records for assigning the role to given models.

메소드 상세

assignTo() 공개 메소드

Assign the role to the given model(s).
public assignTo ( string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null )
$model string | Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Collection
$keys array

createAssignRecords() 보호된 메소드

Create the pivot table records for assigning the role to given models.
protected createAssignRecords ( Model $model, array $keys ) : array
$model Illuminate\Database\Eloquent\Model
$keys array
리턴 array

getClipboardInstance() 공개 메소드

retractFrom() 공개 메소드

Retract the role from the given model(s).
public retractFrom ( string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null )
$model string | Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Collection
$keys array

scopeWhereAssignedTo() 공개 메소드

Constrain the given query to roles that were assigned to the given authorities.
public scopeWhereAssignedTo ( Builder $query, string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) : void
$query Illuminate\Database\Eloquent\Builder
$model string | Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Collection
$keys array
리턴 void

users() 공개 메소드

The users relationship.
public users ( ) : Illuminate\Database\Eloquent\Relations\MorphedByMany
리턴 Illuminate\Database\Eloquent\Relations\MorphedByMany