Total Complexity | 2 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 50% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class TechTips extends Model |
||
8 | { |
||
9 | protected $primaryKey = 'tip_id'; |
||
10 | protected $fillable = ['user_id', 'subject', 'tip_type_id', 'description', 'created_at']; // ToDo: Remove Created_at - future build |
||
11 | protected $casts = [ |
||
12 | 'created_at' => 'datetime:M d, Y', |
||
13 | 'updated_at' => 'datetime:M d, Y', |
||
14 | ]; |
||
15 | |||
16 | 8 | public function systemTypes() |
|
17 | { |
||
18 | 8 | return $this->hasManyThrough('App\SystemTypes', 'App\TechTipSystems', 'tip_id', 'sys_id', 'tip_id', 'sys_id'); |
|
19 | } |
||
20 | |||
21 | // public function user() |
||
22 | // { |
||
23 | // return $this->hasOne('App\User', 'user_id', 'user_id'); |
||
24 | // } |
||
25 | |||
26 | // public function techTipComments() |
||
27 | // { |
||
28 | // return $this->belongsTo('App\TechTipComments', 'tip_id', 'tip_id'); |
||
29 | // } |
||
30 | |||
31 | // public function techTipFiles() |
||
32 | // { |
||
33 | // return $this->belongsTo('App\TechTipFiles', 'tip_id', 'tip_id'); |
||
34 | // } |
||
35 | |||
36 | public function techTipSystems() |
||
39 | } |
||
40 | } |
||
41 |