Przeglądaj źródła

Update Story Model

Daniel Supernault 6 lat temu
rodzic
commit
ae78addab4
1 zmienionych plików z 14 dodań i 1 usunięć
  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);
+	}
 }