protected function transform($messages, $format, $messageKey)
{
$messages = (array) $messages;
// We will simply spin through the given messages and transform each one
// replacing the :message place holder with the real message allowing
// the messages to be easily formatted to each developer's desires.
foreach ($messages as $key => &$message) {
$replace = [':message', ':key'];
$message = str_replace($replace, [$message, $messageKey], $format);
}
return $messages;
}