瀏覽代碼

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');
+    }
 }