Property | Type | Description | |
---|---|---|---|
$guarded | array | The attributes that aren't mass assignable. |
Method | Description | |
---|---|---|
__construct ( array $attributes = [] ) | Create a new Eloquent model instance. | |
findByName ( string $name ) : |
Find a role by its name. | |
hasPermissionTo ( string | Spatie\Permission\Models\Permission $permission ) : boolean | Determine if the user may perform the given permission. | |
permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany | A role may be given various permissions. | |
users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany | A role may be assigned to various users. |
public __construct ( array $attributes = [] ) | ||
$attributes | array |
public static findByName ( string $name ) : |
||
$name | string | |
return |
public hasPermissionTo ( string | Spatie\Permission\Models\Permission $permission ) : boolean | ||
$permission | string | Spatie\Permission\Models\Permission | |
return | boolean |
public permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany | ||
return | Illuminate\Database\Eloquent\Relations\BelongsToMany |
public users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany | ||
return | Illuminate\Database\Eloquent\Relations\BelongsToMany |
public array $guarded | ||
return | array |