src/Listify.php
protected function getBottomItem(Model $exclude = null)
    {
        $query = $this->listifyScopedQuery()
            ->whereNotNull($this->getTable() . '.' . $this->positionColumn())
            ->orderBy($this->getTable() . "." . $this->positionColumn(), "DESC")
            ->take(1);

        if ($exclude) {
            $query->where($this->getPrimaryKey(), '!=', $exclude->id);
        }
        
        return $query->first();
    }
protected function getBottomItem(Model $exclude = null)
    {
        $query = $this->listifyScopedQuery()
            ->whereNotNull($this->getTable() . '.' . $this->positionColumn())
            ->orderBy($this->getTable() . "." . $this->positionColumn(), "DESC")
            ->take(1);

        if ($exclude) {
            $query->where($this->getPrimaryKey(), '!=', $exclude->id);
        }
        
        return $query->first();
    }
protected function getBottomItem ( Model $ exclude = null ) { $ query = $ this -> listifyScopedQuery ( ) -> whereNotNull ( $ this -> getTable ( ) . '.' . $ this -> positionColumn ( ) ) -> orderBy ( $ this -> getTable ( ) . "." . $ this -> positionColumn ( ) , "DESC" ) -> take ( 1 ) ; if ( $ exclude ) { $ query -> where ( $ this -> getPrimaryKey ( ) , '!=' , $ exclude -> id ) ; } return $ query -> first ( ) ; }
Returns the bottom item.

@param null|Model|Listify $exclude  a model to exclude as a match
@return null|Model|Listify
Returns the bottom item .