PHP 트레잇 App\Traits\PermissionHasUsersTrait

파일 보기 프로젝트 열기: sroutier/laravel-5.1-enterprise-starter-kit

공개 메소드들

메소드 설명
boot ( ) : void | boolean Boot the permission model Attach event listener to remove the many-to-many records when trying to delete Will NOT delete any records if the permission model uses soft deletes.
getIsUsedByUserAttribute ( ) : boolean
hasUser ( $userName ) : boolean
users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many-to-Many relations with user model.

메소드 상세

boot() 공개 정적인 메소드

Boot the permission model Attach event listener to remove the many-to-many records when trying to delete Will NOT delete any records if the permission model uses soft deletes.
public static boot ( ) : void | boolean
리턴 void | boolean

getIsUsedByUserAttribute() 공개 메소드

hasUser() 공개 메소드

public hasUser ( $userName ) : boolean
$userName
리턴 boolean

users() 공개 메소드

Many-to-Many relations with user model.
public users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
리턴 Illuminate\Database\Eloquent\Relations\BelongsToMany