use IlluminateHttpResponse;
protected function failedValidation(IlluminateContractsValidationValidator $validator)
{
$response = new Response(['error' => $validator->errors()->first()], 422);
throw new ValidationException($validator, $response);
}