PHP Trait App\Traits\PermissionHasUsersTrait

Afficher le fichier Open project: sroutier/laravel-5.1-enterprise-starter-kit

Méthodes publiques

Méthode Description
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.

Method Details

boot() public static méthode

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
Résultat void | boolean

getIsUsedByUserAttribute() public méthode

public getIsUsedByUserAttribute ( ) : boolean
Résultat boolean

hasUser() public méthode

public hasUser ( $userName ) : boolean
$userName
Résultat boolean

users() public méthode

Many-to-Many relations with user model.
public users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
Résultat Illuminate\Database\Eloquent\Relations\BelongsToMany