PHP Class app\Role

Inheritance: extends app\RoleAtom
Show file Open project: appzcoder/laravel-admin Class Usage Examples

Protected Properties

Property Type Description
$fillable array The attributes that are mass assignable.

Public Methods

Method Description
givePermissionTo ( Permission $permission ) : mixed Grant the given permission to a role.
permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany A role may be given various permissions.

Method Details

givePermissionTo() public method

Grant the given permission to a role.
public givePermissionTo ( Permission $permission ) : mixed
$permission Permission
return mixed

permissions() public method

A role may be given various permissions.
public permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany

Property Details

$fillable protected property

The attributes that are mass assignable.
protected array $fillable
return array