PHP Trait Laratrust\Traits\LaratrustGroupTrait

Show file Open project: santigarcor/laratrust

Public Methods

Method Description
bootLaratrustGroupTrait ( ) : 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 group model uses soft deletes.
roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many-to-Many relations with role model.
users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many-to-Many relations with user model.

Method Details

bootLaratrustGroupTrait() public static method

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 group model uses soft deletes.
public static bootLaratrustGroupTrait ( ) : void | boolean
return void | boolean

roles() public method

Many-to-Many relations with role model.
public roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany

users() public method

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