protected function csv($key = null, $default = null)
    {
        if (empty($this->contentAsArray)) {
            $content = $this->getContent();
            $data = DataFormatter::csvToArray($content);

            if (!empty($data)) {
                $this->contentAsArray = ResourcesWrapper::wrapResources($data);
            }
        }

        if (null === $key) {
            return $this->contentAsArray;
        } else {
            return array_get($this->contentAsArray, $key, $default);
        }
    }
protected function csv($key = null, $default = null)
    {
        if (empty($this->contentAsArray)) {
            $content = $this->getContent();
            $data = DataFormatter::csvToArray($content);

            if (!empty($data)) {
                $this->contentAsArray = ResourcesWrapper::wrapResources($data);
            }
        }

        if (null === $key) {
            return $this->contentAsArray;
        } else {
            return array_get($this->contentAsArray, $key, $default);
        }
    }
protected function csv ( $ key = null , $ default = null ) { if ( empty ( $ this -> contentAsArray ) ) { $ content = $ this -> getContent ( ) ; $ data = DataFormatter :: csvToArray ( $ content ) ; if ( ! empty ( $ data ) ) { $ this -> contentAsArray = ResourcesWrapper :: wrapResources ( $ data ) ; } } if ( null === $ key ) { return $ this -> contentAsArray ; } else { return array_get ( $ this -> contentAsArray , $ key , $ default ) ; } }
Returns CSV payload data

@param null $key
@param null $default

@return array|mixed|null
Returns CSV payload data