json([ 'message' => 'Validation failed.', 'errors' => $validator->errors(), 'code' => 'ERROR', 'token' => '' ], Response::HTTP_UNPROCESSABLE_ENTITY)); } }