Skip to content

Instantly share code, notes, and snippets.

@asaokamei
Created August 11, 2014 09:15
Show Gist options
  • Save asaokamei/8b9dd458ec4bad37dfb6 to your computer and use it in GitHub Desktop.
Save asaokamei/8b9dd458ec4bad37dfb6 to your computer and use it in GitHub Desktop.
$errMsg = getErrors( $errors );
function getErrors( $errors )
{
return function( $name ) use( $errors ) {
return $errors->first( $name, '<p class="text-danger">:message</p>' );
};
}
//...
{{ $errMsg('name') }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment