1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

#47 - Putting the comments right under the page.

This commit is contained in:
Abijeet
2017-06-11 11:41:33 +05:30
parent 9dbd7fa618
commit fd50efb503
2 changed files with 8 additions and 10 deletions

View File

@ -66,6 +66,10 @@ class Page extends Entity
return $this->hasMany(Attachment::class, 'uploaded_to')->orderBy('order', 'asc');
}
public function comments() {
return $this->hasMany(Comment::class, 'page_id')->orderBy('created_on', 'asc');
}
/**
* Get the url for this page.
* @param string|bool $path