Overtrue\Validation\MessageBag::get PHP Метод

get() публичный Метод

Get all of the messages from the bag for a given key.
public get ( string $key, string $format = null ) : array
$key string
$format string
Результат array
    public function get($key, $format = null)
    {
        $format = $this->checkFormat($format);
        // If the message exists in the container, we will transform it and return
        // the message. Otherwise, we'll return an empty array since the entire
        // methods is to return back an array of messages in the first place.
        if (array_key_exists($key, $this->messages)) {
            return $this->transform($this->messages[$key], $format, $key);
        }
        return [];
    }