Total Complexity | 2 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class Role extends Model |
||
11 | { |
||
12 | use ForUser; |
||
13 | |||
14 | const JUNIOR = 'junior'; |
||
15 | const MID = 'mid'; |
||
16 | const SENIOR = 'senior'; |
||
17 | |||
18 | /** |
||
19 | * The attributes that are mass assignable. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $fillable = ['guide_id', 'user_id', 'role']; |
||
24 | |||
25 | /** |
||
26 | * The database table used by the model. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $table = 'guide_roles'; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | public $timestamps = false; |
||
36 | |||
37 | /** |
||
38 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
39 | */ |
||
40 | public function guide() |
||
41 | { |
||
42 | return $this->belongsTo(Guide::class); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
47 | */ |
||
48 | public function user() |
||
51 | } |
||
52 | } |
||
53 |