浏览代码

Add new method to Status model

Daniel Supernault 7 年之前
父节点
当前提交
d391b1a2a6
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/Status.php

+ 5 - 0
app/Status.php

@@ -42,4 +42,9 @@ class Status extends Model
       return $this->hasMany(Like::class);
     }
 
+    public function comments()
+    {
+      return $this->hasMany(Comment::class);
+    }
+
 }