1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Created by Reliese Model. |
||
5 | * Date: Thu, 12 Jul 2018 22:39:28 +0000. |
||
6 | */ |
||
7 | |||
8 | namespace App\Models; |
||
9 | |||
10 | use Backpack\CRUD\app\Models\Traits\CrudTrait; |
||
11 | use Backpack\CRUD\app\Models\Traits\SpatieTranslatable\HasTranslations; |
||
12 | |||
13 | /** |
||
14 | * Class UserRole |
||
15 | * |
||
16 | * @property int $id |
||
17 | * @property string $key |
||
18 | * @property string $name |
||
19 | * @property \Jenssegers\Date\Date $created_at |
||
20 | * @property \Jenssegers\Date\Date $updated_at |
||
21 | * @property \Illuminate\Database\Eloquent\Collection $users |
||
22 | */ |
||
23 | class UserRole extends BaseModel |
||
24 | { |
||
25 | use CrudTrait; |
||
26 | use HasTranslations; |
||
27 | |||
28 | /** |
||
29 | * @var $fillable string[] |
||
0 ignored issues
–
show
Documentation
Bug
introduced
by
![]() |
|||
30 | */ |
||
31 | protected $fillable = [ |
||
32 | 'name' |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * @var $translatable string[] |
||
0 ignored issues
–
show
|
|||
37 | */ |
||
38 | public $translatable = [ |
||
39 | 'name' |
||
40 | ]; |
||
41 | |||
42 | public function users() // phpcs:ignore |
||
43 | { |
||
44 | return $this->hasMany(\App\Models\User::class); |
||
45 | } |
||
46 | } |
||
47 |