Total Complexity | 2 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | class Like extends Model |
||
17 | { |
||
18 | /** |
||
19 | * The table associated with the model. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $table = 'likes'; |
||
24 | |||
25 | /** |
||
26 | * The attributes that are mass assignable. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $fillable = ['user_id']; |
||
31 | |||
32 | /** |
||
33 | * Define a polymorphic, inverse one-to-one or many relationship. |
||
34 | * |
||
35 | * @return MorphTo |
||
36 | */ |
||
37 | public function likable() |
||
38 | { |
||
39 | return $this->morphTo(); |
||
40 | } |
||
41 | |||
42 | public function user() |
||
45 | } |
||
46 | } |
||
47 |