<?php

if (! function_exists('messages')) {
    /**
     * Add a message to the bag.
     *
     * @param  string  $key
     * @param  string  $message
     *
     * @return \Orchestra\Messages\MessageBag
     */
    function messages($key, $message)
    {
        return app('orchestra.messages')->add($key, $message);
    }
}

<?php

if (! function_exists('messages')) {
    /**
     * Add a message to the bag.
     *
     * @param  string  $key
     * @param  string  $message
     *
     * @return \Orchestra\Messages\MessageBag
     */
    function messages($key, $message)
    {
        return app('orchestra.messages')->add($key, value($message));
    }
}

Allow to use value as closure.
Allow to use value as closure.

Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
