public static function getProxy()
    {
        if (!static::$__es_proxy)
        {
            $instance = new static;

            if ($instance instanceof Model)
            {
                static::$__es_proxy = App::make('iverberk.larasearch.proxy', $instance);

                return static::$__es_proxy;
            } else
            {
                throw new \Exception("This trait can ony be used in Eloquent models.");
            }
        }

        return static::$__es_proxy;
    }
public static function getProxy()
    {
        if (!static::$__es_proxy)
        {
            $instance = new static;

            if ($instance instanceof Model)
            {
                static::$__es_proxy = App::make('iverberk.larasearch.proxy', $instance);

                return static::$__es_proxy;
            } else
            {
                throw new \Exception("This trait can ony be used in Eloquent models.");
            }
        }

        return static::$__es_proxy;
    }
public static function getProxy ( ) { if ( ! static :: $ __es_proxy ) { $ instance = new static ; if ( $ instance instanceof Model ) { static :: $ __es_proxy = App :: make ( 'iverberk.larasearch.proxy' , $ instance ) ; return static :: $ __es_proxy ; } else { throw new \ Exception ( "This trait can ony be used in Eloquent models." ) ; } } return static :: $ __es_proxy ; }
Return an instance of the Elasticsearch proxy

@throws \Exception
@return \Iverberk\Larasearch\Proxy | bool
Return an instance of the Elasticsearch proxy