BookStack\Repos\EntityRepo::getRecentlyCreatedPages PHP Method

getRecentlyCreatedPages() public method

Get the latest pages added to the system.
public getRecentlyCreatedPages ( integer $count = 20, integer $page, boolean $additionalQuery = false )
$count integer
$page integer
$additionalQuery boolean
    public function getRecentlyCreatedPages($count = 20, $page = 0, $additionalQuery = false)
    {
        $query = $this->permissionService->enforcePageRestrictions($this->page)->orderBy('created_at', 'desc')->where('draft', '=', false);
        if ($additionalQuery !== false && is_callable($additionalQuery)) {
            $additionalQuery($query);
        }
        return $query->with('book')->skip($page * $count)->take($count)->get();
    }