protected function isCollection($data)
    {
        if (is_array($data) || $data instanceof \Illuminate\Support\Collection || $data instanceof Paginator) {
            return true;
        }

        $length = count($this->getCollectionClass());

        for ($i = 0; $i < $length; $i++) {
            $class = \Illuminate\Support\Arr::get($this->getCollectionClass(), $i);

            if ($data instanceof $class) {
                return true;
            }
        }

        return false;
    }
protected function isCollection($data)
    {
        if (is_array($data) || $data instanceof \Illuminate\Support\Collection || $data instanceof Paginator) {
            return true;
        }

        $length = count($this->getCollectionClass());

        for ($i = 0; $i < $length; $i++) {
            $class = \Illuminate\Support\Arr::get($this->getCollectionClass(), $i);

            if ($data instanceof $class) {
                return true;
            }
        }

        return false;
    }
protected function isCollection ( $ data ) { if ( is_array ( $ data ) || $ data instanceof \ Illuminate \ Support \ Collection || $ data instanceof Paginator ) { return true ; } $ length = count ( $ this -> getCollectionClass ( ) ) ; for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { $ class = \ Illuminate \ Support \ Arr :: get ( $ this -> getCollectionClass ( ) , $ i ) ; if ( $ data instanceof $ class ) { return true ; } } return false ; }
determine if an object should be recognize as collection.

@return bool
determine if an object should be recognize as collection .