phpvms/app/Models/Role.php

34 lines
567 B
PHP
Raw Normal View History

<?php
namespace App\Models;
2017-12-16 02:36:13 +08:00
use Laratrust\Models\LaratrustRole;
/**
* @method static where(string $string, $group)
* @method static firstOrCreate(array $array, array $array1)
* @method static truncate()
*/
2017-12-16 02:36:13 +08:00
class Role extends LaratrustRole
{
protected $fillable = [
'id',
'name',
'display_name',
'read_only',
];
protected $casts = [
'read_only' => 'boolean',
];
/**
* Validation rules
*
* @var array
*/
public static $rules = [
'display_name' => 'required',
];
}