]> BookStack Code Mirror - bookstack/blobdiff - app/Page.php
Merge branch 'master' of https://github.com/Abijeet/BookStack
[bookstack] / app / Page.php
index c9823e7e4ccfcb65dce71328f28fa0f4f04d40a3..4a8d32780388565d668eca10ad249beb929d3c61 100644 (file)
@@ -38,6 +38,15 @@ class Page extends Entity
     {
         return $this->belongsTo(Chapter::class);
     }
+    
+    /**
+     * Get the comments in the page.
+     * @return \Illuminate\Database\Eloquent\Relations\HasMany
+     */
+    public function comment()
+    {
+        return $this->hasMany(Comment::class);
+    }
 
     /**
      * Check if this page has a chapter.