Flugg\Responder\Traits\HandlesApiErrors::transformValidationException PHP Method

transformValidationException() protected method

Transform a Laravel validation exception into an API exception.
protected transformValidationException ( Exception $exception ) : void
$exception Exception
return void
    protected function transformValidationException(Exception $exception)
    {
        if ($exception instanceof ValidationException) {
            throw new ValidationFailedException($exception->validator);
        }
    }