protected function __wrap($value)
    {
        if (is_object($value)) {
            return $value;
        }

        return $this->isArrayable($value)
            ? new static($this->wrap($value)->toArray())
            : $value;
    }
protected function __wrap($value)
    {
        if (is_object($value)) {
            return $value;
        }

        return $this->isArrayable($value)
            ? new static($this->wrap($value)->toArray())
            : $value;
    }
protected function __wrap ( $ value ) { if ( is_object ( $ value ) ) { return $ value ; } return $ this -> isArrayable ( $ value ) ? new static ( $ this -> wrap ( $ value ) -> toArray ( ) ) : $ value ; }
Wrap on static if the value is arrayable.

@param $value
@return static
Wrap on static if the value is arrayable .