1 | <?php |
||
10 | class Comment extends Model |
||
11 | { |
||
12 | /** |
||
13 | * Table name. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $table = 'comments'; |
||
18 | |||
19 | /** |
||
20 | * The attributes that are mass assignable. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $fillable = ['user_id', 'video_id', 'comment']; |
||
25 | |||
26 | /** |
||
27 | * The attributes that should be hidden for arrays. |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $hidden = []; |
||
32 | |||
33 | /** |
||
34 | * User relation. |
||
35 | * |
||
36 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
37 | */ |
||
38 | public function user() |
||
42 | |||
43 | /** |
||
44 | * Video relation. |
||
45 | * |
||
46 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
47 | */ |
||
48 | public function video() |
||
52 | } |
||
53 |