Lookitsatravis\Listify\Listify::lowerItems PHP 메소드

lowerItems() 공개 메소드

Return the next n lower items in the list. Selects all lower items by default.
public lowerItems ( integer $limit = NULL ) : mixed
$limit integer The number of items to return
리턴 mixed Returned items will be of the same type as the current class instance
    public function lowerItems($limit = NULL)
    {
        if ($limit === NULL) {
            $limit = $this->listifyList()->count();
        }
        $position_value = $this->getListifyPosition();
        return $this->listifyList()->where($this->positionColumn(), '>', $position_value)->where($this->positionColumn(), '<=', $position_value + $limit)->take($limit)->orderBy($this->getTable() . "." . $this->positionColumn(), "ASC")->get();
    }