Felixkiss\UniqueWithValidator\UniqueWithValidatorServiceProvider::register PHP Method

register() public method

Register the service provider.
public register ( ) : void
return void
    public function register()
    {
        // Whenever the validator factory is accessed in the container, we set
        // the custom resolver on it (this works in Larvel >= 5.2 as well).
        $this->app->resolving('validator', function ($factory, $app) {
            $factory->resolver(function ($translator, $data, $rules, $messages, $customAttributes = []) {
                return new ValidatorExtension($translator, $data, $rules, $messages, $customAttributes);
            });
        });
    }
UniqueWithValidatorServiceProvider