소스 검색

Update Profile model, add reported relationship

Daniel Supernault 5 년 전
부모
커밋
a34f38633c
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      app/Profile.php

+ 6 - 0
app/Profile.php

@@ -308,4 +308,10 @@ class Profile extends Model
     {
         return $this->hasMany(Story::class);
     }
+
+
+    public function reported()
+    {
+        return $this->hasMany(Report::class, 'object_id');
+    }
 }