protected function throwValidationException($result, $validator)
    {
        $response = new JsonResponse($result, 200);

        if ($result !== true && class_exists(ValidationException::class)) {
            throw new ValidationException($validator, $response);
        }

        throw new HttpResponseException($response);
    }
protected function throwValidationException($result, $validator)
    {
        $response = new JsonResponse($result, 200);

        if ($result !== true && class_exists(ValidationException::class)) {
            throw new ValidationException($validator, $response);
        }

        throw new HttpResponseException($response);
    }
protected function throwValidationException ( $ result , $ validator ) { $ response = new JsonResponse ( $ result , 200 ) ; if ( $ result !== true && class_exists ( ValidationException :: class ) ) { throw new ValidationException ( $ validator , $ response ) ; } throw new HttpResponseException ( $ response ) ; }
Throw the failed validation exception.

@param mixed $result
@param \Illuminate\Validation\Validator  $validator
@return void

@throws \Illuminate\Validation\ValidationException|\Illuminate\Http\Exceptions\HttpResponseException
Throw the failed validation exception .