Skip to content

Instantly share code, notes, and snippets.

@timReynolds
Last active August 29, 2015 14:06
Show Gist options
  • Save timReynolds/ca2842f0f43f684c8add to your computer and use it in GitHub Desktop.
Save timReynolds/ca2842f0f43f684c8add to your computer and use it in GitHub Desktop.
Laravel Message Bag to vinaskrucas/notification method
protected function errorsToNotification(Illuminate\Support\MessageBag $errors)
{
if($errors && $errors->has()){
Notification::container(null, function($container) use ($errors)
{
foreach ($errors->all() as $error)
{
$container->error($error);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment