瀏覽代碼

Update Profile model

Daniel Supernault 6 年之前
父節點
當前提交
0c300ceeee
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      app/Profile.php

+ 12 - 0
app/Profile.php

@@ -279,4 +279,16 @@ class Profile extends Model
     {
         return $this->hasMany(Circle::class);
     }
+
+    public function hashtags()
+    {
+        return $this->hasManyThrough(
+            Hashtag::class,
+            StatusHashtag::class,
+            'profile_id',
+            'id',
+            'id',
+            'hashtag_id'
+        );
+    }
 }