소스 검색

Update Story Model

Daniel Supernault 6 년 전
부모
커밋
ae78addab4
1개의 변경된 파일14개의 추가작업 그리고 1개의 파일을 삭제
  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);
+	}
 }