public function getElasticConfig($key = 'config', $prefix = 'elasticquent')
    {
        $key = $prefix . ($key ? '.' : '') . $key;

        if (function_exists('config')) {
            // Get config helper for Laravel 5.1+
            $config_helper = config();
        } elseif (function_exists('app')) {
            // Get config helper for Laravel 4 & Laravel 5.1
            $config_helper = app('config');
        } else {
            // Create a config helper when using stand-alone Eloquent
            $config_helper = $this->getConfigHelper();
        }

        return $config_helper->get($key);
    }
public function getElasticConfig($key = 'config', $prefix = 'elasticquent')
    {
        $key = $prefix . ($key ? '.' : '') . $key;

        if (function_exists('config')) {
            // Get config helper for Laravel 5.1+
            $config_helper = config();
        } elseif (function_exists('app')) {
            // Get config helper for Laravel 4 & Laravel 5.1
            $config_helper = app('config');
        } else {
            // Create a config helper when using stand-alone Eloquent
            $config_helper = $this->getConfigHelper();
        }

        return $config_helper->get($key);
    }
public function getElasticConfig ( $ key = 'config' , $ prefix = 'elasticquent' ) { $ key = $ prefix . ( $ key ? '.' : '' ) . $ key ; if ( function_exists ( 'config' ) ) { // Get config helper for Laravel 5.1+ $ config_helper = config ( ) ; } elseif ( function_exists ( 'app' ) ) { // Get config helper for Laravel 4 & Laravel 5.1 $ config_helper = app ( 'config' ) ; } else { // Create a config helper when using stand-alone Eloquent $ config_helper = $ this -> getConfigHelper ( ) ; } return $ config_helper -> get ( $ key ) ; }
Get the Elasticquent config

@param string $key the configuration key
@param string $prefix filename of configuration file
@return array configuration
Get the Elasticquent config