src/QueryBuilder.php
public function first()
    {
        $data = $this->getData();

        if (!$this->where) {
            return $data
                ? $this->convertItem(reset($data))
                : null;
        }

        foreach ($data as &$rs) {
            if ($this->matchWhere($rs)) {
                return $this->convertItem($rs);
            }
        }

        return null;
    }
public function first()
    {
        $data = $this->getData();

        if (!$this->where) {
            return $data
                ? $this->convertItem(reset($data))
                : null;
        }

        foreach ($data as &$rs) {
            if ($this->matchWhere($rs)) {
                return $this->convertItem($rs);
            }
        }

        return null;
    }
public function first ( ) { $ data = $ this -> getData ( ) ; if ( ! $ this -> where ) { return $ data ? $ this -> convertItem ( reset ( $ data ) ) : null ; } foreach ( $ data as & $ rs ) { if ( $ this -> matchWhere ( $ rs ) ) { return $ this -> convertItem ( $ rs ) ; } } return null ; }
Get first record

@return array
Get first record