Last active
September 15, 2017 19:00
-
-
Save peterlafferty/0db1d5af5c8b7da43dbf9713be188f33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (count($errors) > 0) { | |
| $messages = []; | |
| foreach ($errors as $error) { | |
| $messages[] = $error->getPropertyPath() . ' ' . $error->getMessage(); | |
| } | |
| return new Utf8JsonResponse($messages, 400); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment