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

Added recently created & updated page listings

Closes #46.
This commit is contained in:
Dan Brown
2016-02-20 18:51:01 +00:00
parent bab6fd1f2f
commit 8eb2960950
12 changed files with 185 additions and 71 deletions

View File

@ -358,5 +358,22 @@ class PageRepo
$page->delete();
}
/**
* Get the latest pages added to the system.
* @param $count
*/
public function getRecentlyCreatedPaginated($count = 20)
{
return $this->page->orderBy('created_at', 'desc')->paginate($count);
}
/**
* Get the latest pages added to the system.
* @param $count
*/
public function getRecentlyUpdatedPaginated($count = 20)
{
return $this->page->orderBy('updated_at', 'desc')->paginate($count);
}
}