public function toRet(array $merge = [])
    {
        if ($this->isColl()) {
            return $this->suc($merge + [
                    'data' => $this,
                    'page' => $this->getSqlPart('page'),
                    'rows' => $this->getSqlPart('limit'),
                    'records' => $this->count(),
                ]);
        } else {
            return $this->suc($merge + ['data' => $this]);
        }
    }
public function toRet(array $merge = [])
    {
        if ($this->isColl()) {
            return $this->suc($merge + [
                    'data' => $this,
                    'page' => $this->getSqlPart('page'),
                    'rows' => $this->getSqlPart('limit'),
                    'records' => $this->count(),
                ]);
        } else {
            return $this->suc($merge + ['data' => $this]);
        }
    }
public function toRet ( array $ merge = [ ] ) { if ( $ this -> isColl ( ) ) { return $ this -> suc ( $ merge + [ 'data' => $ this , 'page' => $ this -> getSqlPart ( 'page' ) , 'rows' => $ this -> getSqlPart ( 'limit' ) , 'records' => $ this -> count ( ) , ] ) ; } else { return $ this -> suc ( $ merge + [ 'data' => $ this ] ) ; } }
Returns the success result with model data

@param array $merge
@return array
Returns the success result with model data