PHP Trait Artesaos\Defender\Traits\Models\Permission

Afficher le fichier Open project: artesaos/defender

Méthodes publiques

Méthode Description
__construct ( array $attributes = [] )
newPivot ( Model $parent, array $attributes, string $table, boolean $exists ) : Artesaos\Defender\Pivots\PermissionUserPivot | Illuminate\Database\Eloquent\Relations\Pivot
roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many-to-many permission-role relationship.
users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many-to-many permission-user relationship.

Method Details

__construct() public méthode

public __construct ( array $attributes = [] )
$attributes array

newPivot() public méthode

public newPivot ( Model $parent, array $attributes, string $table, boolean $exists ) : Artesaos\Defender\Pivots\PermissionUserPivot | Illuminate\Database\Eloquent\Relations\Pivot
$parent Illuminate\Database\Eloquent\Model
$attributes array
$table string
$exists boolean
Résultat Artesaos\Defender\Pivots\PermissionUserPivot | Illuminate\Database\Eloquent\Relations\Pivot

roles() public méthode

Many-to-many permission-role relationship.
public roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
Résultat Illuminate\Database\Eloquent\Relations\BelongsToMany

users() public méthode

Many-to-many permission-user relationship.
public users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
Résultat Illuminate\Database\Eloquent\Relations\BelongsToMany