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
|
|
|
/**
|
|
|
|
* @method static where(string $string, $group)
|
2019-11-27 22:19:20 +08:00
|
|
|
* @method static firstOrCreate(array $array, array $array1)
|
|
|
|
* @method static truncate()
|
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
|
|
|
}
|