프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$guarded | array | The attributes that aren't mass assignable. |
메소드 | 설명 | |
---|---|---|
__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 | |
리턴 |
public hasPermissionTo ( string | Spatie\Permission\Models\Permission $permission ) : boolean | ||
$permission | string | Spatie\Permission\Models\Permission | |
리턴 | boolean |
public permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany | ||
리턴 | Illuminate\Database\Eloquent\Relations\BelongsToMany |
public users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany | ||
리턴 | Illuminate\Database\Eloquent\Relations\BelongsToMany |