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

bottomItem() 개인적인 메소드

Returns the bottom item
private bottomItem ( mixed $except = NULL ) : mixed
$except mixed An Eloquent model instance
리턴 mixed Returns an item of the same type as the current class instance
    private function bottomItem($except = NULL)
    {
        $conditions = $this->scopeCondition();
        if ($except !== NULL) {
            $conditions = $conditions . " AND " . $this->primaryKey() . " != " . $except->id;
        }
        $list = $this->listifyList()->whereNotNull($this->getTable() . "." . $this->positionColumn())->whereRaw($conditions)->orderBy($this->getTable() . "." . $this->positionColumn(), "DESC")->take(1)->first();
        return $list;
    }