Spaces:
Running
Running
feat(membership): admin-driven account creation, real estate tier/investment work, in-progress monorepo migration state
b2dcf0f | namespace App\Shared\Exceptions; | |
| use Illuminate\Validation\ValidationException; | |
| class ValidationExceptionMapper | |
| { | |
| public static function details(ValidationException $exception): array | |
| { | |
| return collect($exception->errors()) | |
| ->map(fn (array $messages, string $field): array => [ | |
| 'field' => $field, | |
| 'messages' => $messages, | |
| ]) | |
| ->values() | |
| ->all(); | |
| } | |
| } | |