| 1 | <?php |
||
| 7 | class Comment extends Model |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The attributes that are mass assignable. |
||
| 11 | * |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $fillable = [ |
||
| 15 | 'comment', |
||
| 16 | 'user_id', |
||
| 17 | 'commentable_id', |
||
| 18 | 'commentable_type', |
||
| 19 | ]; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
| 23 | */ |
||
| 24 | public function commentable() |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 31 | */ |
||
| 32 | public function user() |
||
| 36 | } |
||
| 37 |