LMongo\Query\Builder::forPage PHP Method

forPage() public method

Set the limit and offset for a given page.
public forPage ( integer $page, integer $perPage = 15 ) : LMongo\Query\Builder
$page integer
$perPage integer
return LMongo\Query\Builder
    public function forPage($page, $perPage = 15)
    {
        return $this->skip(($page - 1) * $perPage)->take($perPage);
    }
Builder