PHP Class Encore\Admin\Auth\Database\Role

Inheritance: extends Illuminate\Database\Eloquent\Model
显示文件 Open project: z-song/laravel-admin Class Usage Examples

Protected Properties

Property Type Description
$fillable

Public Methods

Method Description
__construct ( array $attributes = [] ) Create a new Eloquent model instance.
administrators ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany A role belongs to many users.
can ( $permission ) : boolean Check user has permission.
cannot ( $permission ) : boolean Check user has no permission.
permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany A role belongs to many permissions.

Method Details

__construct() public method

Create a new Eloquent model instance.
public __construct ( array $attributes = [] )
$attributes array

administrators() public method

A role belongs to many users.
public administrators ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany

can() public method

Check user has permission.
public can ( $permission ) : boolean
$permission
return boolean

cannot() public method

Check user has no permission.
public cannot ( $permission ) : boolean
$permission
return boolean

permissions() public method

A role belongs to many permissions.
public permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany

Property Details

$fillable protected_oe property

protected $fillable