Browse Source

Update Story Model

Daniel Supernault 6 năm trước cách đây
mục cha
commit
ae78addab4
1 tập tin đã thay đổi với 14 bổ sung1 xóa
  1. 14 1
      app/Story.php

+ 14 - 1
app/Story.php

@@ -6,5 +6,18 @@ use Illuminate\Database\Eloquent\Model;
 
 class Story extends Model
 {
-    //
+	public function items()
+	{
+		return $this->hasMany(StoryItem::class);
+	}
+
+	public function reactions()
+	{
+		return $this->hasMany(StoryReaction::class);
+	}
+
+	public function views()
+	{
+		return $this->hasMany(StoryView::class);
+	}
 }