Comment.php 218 B

1234567891011121314
  1. <?php
  2. namespace App;
  3. class Comment extends Model
  4. {
  5. public function post() {
  6. return $this->belongsTo(Post::class);
  7. }
  8. public function user() {
  9. return $this->belongsTo(User::class);
  10. }
  11. }