src/JsonQueriable.php
protected function prepareResult($data, $isObject)
    {
        $output = [];

        if (is_null($data) || is_scalar($data)) {
            return $data;
        }

        if ($this->isMultiArray($data)) {
            foreach ($data as $key => $val) {
                $val = $this->takeColumn($val);
                $output[$key] = $isObject ? (object) $val : $val;
            }
        } else {
            $output = json_decode(json_encode($this->takeColumn($data)), $isObject);
        }

        return $output;
    }
protected function prepareResult($data, $isObject)
    {
        $output = [];

        if (is_null($data) || is_scalar($data)) {
            return $data;
        }

        if ($this->isMultiArray($data)) {
            foreach ($data as $key => $val) {
                $val = $this->takeColumn($val);
                $output[$key] = $isObject ? (object) $val : $val;
            }
        } else {
            $output = json_decode(json_encode($this->takeColumn($data)), $isObject);
        }

        return $output;
    }
protected function prepareResult ( $ data , $ isObject ) { $ output = [ ] ; if ( is_null ( $ data ) || is_scalar ( $ data ) ) { return $ data ; } if ( $ this -> isMultiArray ( $ data ) ) { foreach ( $ data as $ key => $ val ) { $ val = $ this -> takeColumn ( $ val ) ; $ output [ $ key ] = $ isObject ? ( object ) $ val : $ val ; } } else { $ output = json_decode ( json_encode ( $ this -> takeColumn ( $ data ) ) , $ isObject ) ; } return $ output ; }
Prepare data for result

@param mixed $data
@param bool $isObject
@return array|mixed
Prepare data for result