FEATURE: add comments management

This commit is contained in:
Michal Kváček
2016-09-05 16:05:14 +02:00
parent 9ce9f62a45
commit 8f66a96ec0
12 changed files with 137 additions and 6 deletions
+2 -2
View File
@@ -16,11 +16,11 @@ class Comment extends Model
public function author()
{
return $this->belongsTo(User::class);
return $this->belongsTo(User::class, 'user_id');
}
public function article()
{
return $this->belongsTo(Content::class);
return $this->belongsTo(Content::class, 'content_id');
}
}