Get the relation value setting the connection name.

@param string $key
@return mixed
556038
public function getRelationValue($key)
    {
        $relation = parent::getRelationValue($key);

        if ($relation instanceof Collection) {
            $relation->each(function ($model) {
                $this->setRelationConnection($model);
            });

            return $relation;
        }

        $this->setRelationConnection($relation);

        return $relation;
    }
1190924
public static function get(string $key)
    {
        if (!in_array($key, self::$allowedKeys) || !isset(self::$storedValues[$key])) {
            throw new \InvalidArgumentException('Invalid key given');
        }

        return self::$storedValues[$key];
    }
349816
public function get($key)
    {
        if (true === $this->isRelationship($key)) {
            return $this->getRelationship($key);
        }
        return parent::get($key);
    }
253481
public static function key($key)
    {
        $config = static::where('key', $key)->first();

        return $config->value ?? config($key, null);
    }
38236
protected function getEntityAttributeValue(string $key)
    {
        $value = $this->getEntityAttributeRelation($key);

        // In case we are accessing to a multivalued attribute, we will return
        // a collection with pairs of id and value content. Otherwise we'll
        // just return the single model value content as a plain result.
        if ($this->getEntityAttributes()->get($key)->is_collection) {
            return $value->pluck('content');
        }

        return ! is_null($value) ? $value->getAttribute('content') : null;
    }
711486
protected function getEntityAttributeRelation(string $key)
    {
        $key = $this->getEntityAttributeName($key);

        if ($this->relationLoaded($key)) {
            return $this->getRelation($key);
        }

        return $this->getRelationValue($key);
    }
1051492
public static function getSetting($key)
    {
        $setting = Settings::all()->where('settingsKey', $key)->first();
        if($setting) {
            return $setting->value;
        }
        return;
    }
1282122
public function get($key)
    {
        if (!array_key_exists($key, $this->connectingObjects)) {
            return null;
        }

        return $this->connectingObjects[$key];
    }
1322257
public function get(string $key)
    {
        $hash =  self::findFirst([
            'conditions' => "{$this->settingsKey} = ?0 and key = ?1",
            'bind' => [$this->getSettingsKey(), $key]
        ]);

        if ($hash) {
            return $hash->value;
        }

        return null;
    }
653680
public function getAttribute($key)
    {
        // If the attribute is not already available to the
        // model, let's look for any configured relationships
        // that match the $key and return a Collection|static
        if(!$attribute = parent::getAttribute($key)){

            if($relationship = $this->resolveRelationship($key)){

                $attribute = $relationship->getResults();

                $this->relations[$key] = $relationship;
            }
        }

        return $attribute;
    }
853117
public function getAttribute($key)
    {
        if (method_exists($this, $key)) {
            return $this->getRelationValue($key);
        }

        return parent::getAttribute($this->getSnakeKey($key));
    }
804423
public function getQueryParameter($key)
    {
        $queryStringArray = $this->getQueryStringAsArray();

        if (array_key_exists($key, $queryStringArray)) {
            return $queryStringArray[$key];
        }

        return null;
    }
467465
public function get($key) {
        $value = null;

        // If the key already exists in the attribute list, return it immediately
        if ($this->has($key)) {
            $value = $this->_attributes[$key];
        }

        // If the key being accessed points to a relation, either lazy load the data or return the cached data
        if (!$value && $this->hasRelation($key)) {
            $value = $this->getRelation($key)->fetchRelation();

            $this->set($key, $value);

        // If an accessor has been defined, run the value through the accessor before returning
        } else if ($method = $this->hasAccessor($key)) {
            $value = $this->{$method}($value);
        }

        return $value;
    }
1094735
public function getValue( $key )
	{
		if( !isset( $this->_values[ $key ] ) ) {
			return null;
		}

		return $this->_values[ $key ];
	}
420735
private function getParameterName($key)
    {
        $parameterName = $this->parameters->get('parameter_name');
        if (isset($parameterName[$key]) && !is_array($parameterName[$key])) {
            return $parameterName[$key];
        }

        return $key;
    }
738250
public function get(string $key)
    {
        return isset($this->_configValues[$key])
            ? $this->_configValues[$key]
            : null;
    }
1329900
public function getRaw($key)
    {
        if (isset(static::$relations[$key])) {
            return $this->getRelation($key);
        }

        return isset($this->values[$key]) ? $this->values[$key] : null;
    }