Преглед изворни кода

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