Retrieve a single message attribute.

Example:
```
echo $message->attribute('browser-name');
```

@param string $key The attribute key
@return string|null
176103
public function attribute($key)
    {
        return (isset($this->message['attributes'][$key]))
            ? $this->message['attributes'][$key]
            : null;
    }
1179708
private function getAttributeName($key)
    {
        if (0 === strpos($key, '@') && $this->isValidNodeName($attrName = substr($key, 1))) {
            return $attrName;
        }

        return null;
    }
260450
public function getAttribute($key)
    {
        return isset($this->options['attributes'][$key])
        ? $this->options['attributes'][$key]
        : false;
    }
1182570
public function getFlashMessage($key)
    {
        $session = static::getInstance();
        foreach ($session->getFlashBag()->get($key, []) as $message) {
            return $message ?: null;
        }

        return '';
    }
1009270
public function getAttribute($key)
    {
        list($attribute, $locale) = $this->getAttributeAndLocale($key);

        if ($this->isTranslationAttribute($attribute)) {
            if ($this->getTranslation($locale) === null) {
                return $this->getAttributeValue($attribute);
            }

            // If the given $attribute has a mutator, we push it to $attributes and then call getAttributeValue
            // on it. This way, we can use Eloquent's checking for Mutation, type casting, and
            // Date fields.
            if ($this->hasGetMutator($attribute)) {
                $this->attributes[$attribute] = $this->getAttributeOrFallback($locale, $attribute);

                return $this->getAttributeValue($attribute);
            }

            return $this->getAttributeOrFallback($locale, $attribute);
        }

        return parent::getAttribute($key);
    }
1027511
public function getAttribute($key)
    {
        if ($this->isEnumAttribute($key)) {
            return $this->getAttributeValue($key);
        }

        return parent::getAttribute($key);
    }
158117
public function getAttribute($key)
    {
        if ( ! isset($this->attr[$key])) {
            return null;
        }
        $value = $this->attr[$key]['value'];
        if (is_string($value) && ! is_null($this->encode)) {
            // convert charset
            $this->attr[$key]['value'] = $this->encode->convert($value);
        }

        return $this->attr[$key];
    }
473366
public function getAttribute($key)
    {
        // Sanitize the key
        $key = preg_replace('/^_/', '', $key);

        // Decoder ring for legacy keys
        switch ($key) {
            case 'size':
                $key = 'file_size';
                break;
            case 'filename':
            case 'original_filename':
                $key = 'file_name';
                break;
        }

        return $this->getInstance()
            ->getAttribute("{$this->name}_{$key}");
    }
551214
private function getAttribute($key)
    {
        return (isset($this->attributes[$key]) && $this->attributes[$key]) ? $this->attributes[$key] : '';
    }
979975
public function getAttributeValue($key)
    {
        $value = parent::getAttributeValue($key);

        if ($value instanceof Carbon && $this->timestamp_get_with_user_timezone) {
            $value->setTimezone($this->getAuthUserDateTimezone());
        }

        return $value;
    }
412070
public function getAttributeValue($key)
    {
        if (! $this->isTranslatableAttribute($key)) {
            return parent::getAttributeValue($key);
        }

        return $this->getTranslation($key, config('app.locale')) ?: array_first($this->getTranslations($key));
    }
1021949
public function getAttribute($key)
    {
        if (isset($this->repositories[$key])) {
            $className = str_replace('\\', '', $this->repositories[$key]);

            if ($repository = $this->cache->get("repositories.{$className}.{$this->id}.{$key}")) {
                return $repository;
            }

            $class = $this->repositories[$key];

            return $this->cache->set(
                "repositories.{$className}.{$this->id}.{$key}",
                new $class(
                    $this->http,
                    $this->cache,
                    $this->factory,
                    $this->getRepositoryAttributes()
                )
            );
        }

        if ($str = $this->checkForMutator($key, 'get')) {
            $result = $this->{$str}();

            return $result;
        }

        if (! isset($this->attributes[$key])) {
            return;
        }

        return $this->attributes[$key];
    }
315887
public function getMessageData($key)
    {
        if ($this->{$key}) {
            return $this->{$key};
        }

        $data_key = str_replace(['text_body', 'html_body'], ['txt_path', 'html_path'], $key);

        $data = $this->retrieveMessageData($data_key);

        if (!$data) {
            return '';
        }

        $this->{$key} = $data;

        return $data;
    }
1242790
public function getAttribute($key)
	{
		$inAttributes = array_key_exists($key, $this->attributes);

		// If the key references an attribute, we can just go ahead and return the
		// plain attribute value from the model. This allows every attribute to
		// be dynamically accessed through the _get method without accessors.
		if ($inAttributes || $this->hasGetMutator($key))
		{
			return $this->getAttributeValue($key);
		}

		// If the key already exists in the relationships array, it just means the
		// relationship has already been loaded, so we'll just return it out of
		// here because there is no need to query within the relations twice.
		if (array_key_exists($key, $this->relations))
		{
			return $this->relations[$key];
		}

		// If the "attribute" exists as a method on the model, we will just assume
		// it is a relationship and will load and return results from the query
		// and hydrate the relationship's value on the "relationships" array.
		if (method_exists($this, $key))
		{
			return $this->getRelationshipFromMethod($key);
		}
	}
586488
public function getAttribute($key)
    {
        if (in_array($key, $this->getTranslatable())) {
            return $this->translate() ? $this->translate()->$key : null;
        }

        return parent::getAttribute($key);
    }
366481
private function getMessage($filename, $key)
    {
        $messageset = $this->getParameters('messageset');

        // If we have a matching key in messageset it wins
        if (array_get($messageset, $key))
        {
            return array_get($messageset, $key);
        }

        $fileKey = ($this->languageKey) ? $this->languageKey . '.' . $key : $key;

        // We have a couple of options where messages could be retrieved by default,
        // try: Model.php and model.php, as well as Model_Model.php and Model/Model.php
        $messages = [
            $filename . $fileKey,
            Str::lower($filename) . $fileKey,
            str_replace('_', '/', $filename) . $fileKey,
            Str::lower(str_replace('_', '/', $filename)) . $fileKey
        ];

        // Cycle through messages trying to find one that is valid
        foreach ($messages as $message)
        {
            if (Lang::has($message))
            {
                return Lang::get($message);
            }
        }

        return "";
    }
1332085
private function getKey ( $key = NULL ) {
        if ($key === NULL) {
            $key = $this->__keyName;
            return $this->getClassKey() . '_' . $this->$key;
        }
        return $this->getClassKey() . '_' . $key;
    }