Merge branch 'master' of https://github.com/koselig/library
Diff
src/Models/Comment.php | 2 +-
src/Models/Post.php | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
@@ -81,7 +81,7 @@ class Comment extends Model
*/
public function children()
{
return $this->hasMany(Comment::class, 'comment_parent');
return $this->hasMany(self::class, 'comment_parent');
}
/**
@@ -86,6 +86,7 @@ class Post extends Model
* Get all the comments that belong to this post.
*
* @param bool $topLevel only get the top level comments for this post
*
* @return HasMany
*/
public function comments(bool $topLevel = true)