BookStack\Repos\EntityRepo::getRecentlyCreatedBooks PHP Method

getRecentlyCreatedBooks() public method

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