]> BookStack Code Mirror - bookstack/blobdiff - app/Repos/BookRepo.php
Added Popular books list with relevant tests
[bookstack] / app / Repos / BookRepo.php
index 9be77defe0cd7a6bac169a0061a85f596081edd7..110426bbdd3d79bf1c955b5b24897c0349654ba5 100644 (file)
@@ -77,6 +77,11 @@ class BookRepo
         return Views::getUserRecentlyViewed($count, $page, $this->book);
     }
 
+    public function getPopular($count = 10, $page = 0)
+    {
+        return Views::getPopular($count, $page, $this->book);
+    }
+
     /**
      * Get a book by slug
      * @param $slug