diff options
Diffstat (limited to 'app/Discussion.php')
| -rw-r--r-- | app/Discussion.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/Discussion.php b/app/Discussion.php new file mode 100644 index 0000000..facb847 --- /dev/null +++ b/app/Discussion.php @@ -0,0 +1,24 @@ +<?php + +namespace App; + +use Illuminate\Database\Eloquent\Model; + +class Discussion extends Model +{ + protected $table = "discussion"; + protected $fillable = [ + 'article_id', + 'title', + 'source', + 'item_id', + 'source_url', + 'posted_on', + 'comments', + 'upvotes' + ]; + + public function getArticle() { + $this->belongsTo('App\Article'); + } +} |
