Переглянути джерело

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