protected function parseErrors($provider)
    {
        if ($provider instanceof MessageBag) {
            return $provider;
        } else if ($provider instanceof MessageProviderInterface) {
            return $provider->getMessageBag();
        }

        return new MessageBag((array) $provider);
    }
protected function parseErrors($provider)
    {
        if ($provider instanceof MessageBag) {
            return $provider;
        } else if ($provider instanceof MessageProviderInterface) {
            return $provider->getMessageBag();
        }

        return new MessageBag((array) $provider);
    }
protected function parseErrors ( $ provider ) { if ( $ provider instanceof MessageBag ) { return $ provider ; } else if ( $ provider instanceof MessageProviderInterface ) { return $ provider -> getMessageBag ( ) ; } return new MessageBag ( ( array ) $ provider ) ; }
Parse the given errors into an appropriate value.

@param  \Nova\Support\Contracts\MessageProviderInterface|array  $provider
@return \Nova\Support\MessageBag
Parse the given errors into an appropriate value .