2017-06-11 09:10:31 +08:00
|
|
|
<?php
|
2018-03-20 09:50:40 +08:00
|
|
|
|
2017-06-11 09:10:31 +08:00
|
|
|
namespace App\Models;
|
|
|
|
|
2017-12-16 02:36:13 +08:00
|
|
|
use Laratrust\Models\LaratrustRole;
|
2017-06-11 09:10:31 +08:00
|
|
|
|
2019-06-21 04:52:37 +08:00
|
|
|
/**
|
2019-12-22 12:46:41 +08:00
|
|
|
* @mixin \Illuminate\Database\Eloquent\Builder
|
2019-06-21 04:52:37 +08:00
|
|
|
*/
|
2017-12-16 02:36:13 +08:00
|
|
|
class Role extends LaratrustRole
|
2017-06-11 09:10:31 +08:00
|
|
|
{
|
2019-06-21 04:52:37 +08:00
|
|
|
protected $fillable = [
|
|
|
|
'id',
|
|
|
|
'name',
|
|
|
|
'display_name',
|
|
|
|
'read_only',
|
|
|
|
];
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
'read_only' => 'boolean',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Validation rules
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public static $rules = [
|
|
|
|
'display_name' => 'required',
|
|
|
|
];
|
2017-06-11 09:10:31 +08:00
|
|
|
}
|