public function getResults()
    {
        $key = $this->dataKey;
        $content = $this->content;

        if (is_object($content) && property_exists($content, $key)) {
            return new Collection($content->{$key});
        } elseif (is_array($content)) {
            return new Collection($content);
        }

        return $content;
    }
public function getResults()
    {
        $key = $this->dataKey;
        $content = $this->content;

        if (is_object($content) && property_exists($content, $key)) {
            return new Collection($content->{$key});
        } elseif (is_array($content)) {
            return new Collection($content);
        }

        return $content;
    }
public function getResults ( ) { $ key = $ this -> dataKey ; $ content = $ this -> content ; if ( is_object ( $ content ) && property_exists ( $ content , $ key ) ) { return new Collection ( $ content -> { $ key } ) ; } elseif ( is_array ( $ content ) ) { return new Collection ( $ content ) ; } return $ content ; }
Return response content

@return \Illuminate\Support\Collection
Return response content