PHP Trait Artesaos\Defender\Traits\Models\Permission

Datei anzeigen Open project: artesaos/defender

Public Methods

Method 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 method

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

newPivot() public method

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
return Artesaos\Defender\Pivots\PermissionUserPivot | Illuminate\Database\Eloquent\Relations\Pivot

roles() public method

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

users() public method

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