Boot the custom validators

@return void
491426
private function bootValidators()
    {
        Validator::extend('enum_key', function($attribute, $value, $parameters, $validator) {
            $enum = $parameters[0] ?? null;

            return (new EnumKey($enum))->passes($attribute, $value);
        });

        Validator::extend('enum_value', function($attribute, $value, $parameters, $validator) {
            $enum = $parameters[0] ?? null;

            $strict = $parameters[1] ?? null;

            if (! $strict) {
                return (new EnumValue($enum))->passes($attribute, $value);
            }

            $strict = !! json_decode(strtolower($strict));

            return (new EnumValue($enum, $strict))->passes($attribute, $value);
        });
    }
359100
public function boot()
    {
        $this->loadTranslationsFrom(__DIR__ . '/../lang', 'clamav-validator');

        $this->app['validator']
            ->resolver(function ($translator, $data, $rules, $messages, $customAttributes = []) {
                return new ClamavValidator(
                    $translator,
                    $data,
                    $rules,
                    $messages,
                    $customAttributes
                );
            });

        $this->addNewRules();
    }
1207532
public function boot()
    {
        if (config('getrets.enable_example')) {
            $this->loadRoutesFrom(realpath(__DIR__.'/../../routes/web.php'));
        }

        $this->loadTranslationsFrom(realpath(__DIR__.'/../../resources/lang'), 'GetRETS');
        $this->publishes([realpath(__DIR__.'/../../resources/lang') => resource_path('lang/vendor/timitek')], 'translations');

        $this->loadViewsFrom(realpath(__DIR__.'/../../resources/views'), 'GetRETS');
        $this->publishes([realpath(__DIR__.'/../../resources/views') => base_path('resources/views/vendor/timitek/getrets')], 'views');

        $this->loadMigrationsFrom(realpath(__DIR__.'/../../database/migrations'));
        $this->publishes([realpath(__DIR__.'/../../database/migrations') => database_path('migrations')], 'migrations');

        $this->publishes([realpath(__DIR__.'/../../resources/assets') => public_path('assets')], 'public');

        $this->publishes([realpath(__DIR__.'/../../config') => config_path('')], 'config');

        $this->publishes([realpath(__DIR__.'/../../database/seeds') => database_path('seeds')], 'seeds');
    }
242487
public function boot() {

        $this->setupConfiguration();

        $this->setupMigrations();
        $this->setupSeeds();

        $this->setupRoutes($this->app->router);

        $this->setupTranslations();

        $this->setupViews();

        $this->setupAssets();
    }
839901
public function boot()
    {
        $this->setFingerprint(mt_rand());

        $this->setArguments($this->getMessages());
        $this->setSingular($this->getArgument('title'));
        $this->setPlural($this->getArgument('title'));
        // $this->setValue($this->getArgument('default'));

        $this->manager->boot($this);
    }
333357
public function boot()
    {
        $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'instance-validator');

        $this->publishes([
            __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/instance-validator'),
        ]);

        Validator::extend('instance_of', function ($attribute, $value, $parameters, $validator)
        {
            if (count($parameters) != 1)
            {
                throw new Exception("The 'instance_of' validator requires a single type to be specified.");
            }

            return $value instanceof $parameters[0];
        });

        Validator::replacer('instance_of', function ($message, $attribute, $rule, $parameters)
        {
            $msg = Lang::trans('instance-validator::' . $message);
            $msg = str_replace([':attribute', ':type'], [$attribute, $parameters[0]], $msg);
            return $msg;
        });

        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Validator::extend('collection_of', function ($attribute, $value, $parameters, $validator)
        {
            if (count($parameters) != 1)
            {
                throw new Exception("The 'collection_of' validator requires a single type to be specified.");
            }

            if(!$value instanceof Collection)
            {
                throw new Exception("The 'collection_of' validator requires a Collection instance.");
            }

            if ($value->isEmpty()) return true;

            $itemIsCorrectType = $value[0] instanceof $parameters[0] || (strtolower($parameters[0]) === 'string' && is_string($value[0]));

            return $itemIsCorrectType;
        });

        Validator::replacer('collection_of', function ($message, $attribute, $rule, $parameters)
        {
            $msg = Lang::trans('instance-validator::' . $message);
            $msg = str_replace([':attribute', ':type'], [$attribute, $parameters[0]], $msg);
            return $msg;
        });

        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Validator::extend('paginator_of', function ($attribute, $value, $parameters, $validator)
        {
            if (count($parameters) != 1)
            {
                throw new Exception("The 'paginator_of' validator requires a single type to be specified.");
            }

            if(!$value instanceof LengthAwarePaginator)
            {
                throw new Exception("The 'paginator_of' validator requires a LengthAwarePaginator instance.");
            }

            if ($value->isEmpty()) return true;

            $itemIsCorrectType = $value->items()[0] instanceof $parameters[0] || (strtolower($parameters[0]) === 'string' && is_string($value->items()[0]));

            return $itemIsCorrectType;
        });

        Validator::replacer('paginator_of', function ($message, $attribute, $rule, $parameters)
        {
            $msg = Lang::trans('instance-validator::' . $message);
            $msg = str_replace([':attribute', ':type'], [$attribute, $parameters[0]], $msg);
            return $msg;
        });
    }
307865
public function boot()
    {
        $this->publishes([
            $this->getConfigPath() => config_path('ipboard.php'),
        ]);

        \Validator::extend("is_csv_numeric", function($attribute, $value, $parameters, $validator){
            return preg_match("/^[0-9,]+$/i", $value);
        });

        \Validator::extend("is_csv_alpha", function($attribute, $value, $parameters, $validator){
            return preg_match("/^[A-Z,]+$/i", $value);
        });

        \Validator::extend("is_csv_alphanumeric", function($attribute, $value, $parameters, $validator){
            return preg_match("/^[0-9A-Z,]+$/i", $value);
        });
    }
1077511
public function boot()
    {
        $templatePath = config('generators.template_path', $fallbackTemplatePath = __DIR__.'/Stubs').'/';
        
        if (!is_dir($templatePath)) {
            $templatePath = $fallbackTemplatePath . '/';
        }

        $this->publishes([
            __DIR__ . '/Stubs/' => $templatePath
        ], 'stubs');

        $configPath = config_path('generators.php');
       
        $this->publishes([
            __DIR__.'/config.php' => $configPath,
        ], 'config');

        if (file_exists($configPath)) {
            $this->mergeConfigFrom($configPath, 'generators');
        }

        $this->setStubBasePath($templatePath);   
    }
329492
public function boot()
	{
		$this->app['events']->listen('router.matched', function()
		{
			$this->app->resolving(function(FormRequest $request, $app)
			{
				$this->initializeRequest($request, $app['request']);

				$request->setContainer($app)
                        ->setRedirector($app['Illuminate\Routing\Redirector']);
			});
		});
	}
831133
public function boot()
    {
        $this->loadTranslationsFrom(__DIR__ . '/../lang', 'image-validator');

        $messages = trans('image-validator::validation');

        $this->app->bind(ImageValidator::class, function($app) use ($messages) {
            $validator = new ImageValidator($app['translator'], [], [], $messages);

            if (isset($app['validation.presence'])) {
                $validator->setPresenceVerifier($app['validation.presence']);
            }

            return $validator;
        });

        $this->addNewRules();
    }
1138017
public function boot()
    {
        /**
         * Extend the Laravel Validator with the "zxcvbn_min" rule
         */
        Validator::extend('zxcvbn_min', function($attribute, $value, $parameters) {
            $zxcvbn = new ZxcvbnPhp();
            $zxcvbn = $zxcvbn->passwordStrength($value);
            $target = 5;

            if (isset($parameters[0])) {
                $target = $parameters[0];
            }

            return ($zxcvbn['score'] >= $target);
        }, 'Your :attribute is not secure enough.');

        Validator::replacer('zxcvbn_min', function($message, $attribute) {
            $message = str_replace(':attribute', $attribute, $message);
            return $message;
        });

        /**
         * Extend the Laravel Validator with the "zxcvbn_min" rule
         */
        Validator::extend('zxcvbn_dictionary', function($attribute, $value, $parameters) {
            $email = null;
            $username = null;

            if (isset($parameters[0])) {
                $email = $parameters[0];
                $username = $parameters[1];
            }

            $zxcvbn = new ZxcvbnPhp();
            $zxcvbn = $zxcvbn->passwordStrength($value, [$username, $email]);

            if (isset($zxcvbn['match_sequence'][0])) {
                $dictionary = $zxcvbn['match_sequence'][0];
                if (isset($dictionary->dictionaryName)) {
                    return false;
                }
            }

            return true;

        }, 'Your :attribute is insecure. It either matches a commonly used password, or you have used a similar username/password combination.');

        Validator::replacer('zxcvbn_dictionary', function($message, $attribute) {
            $message = str_replace(':attribute', $attribute, $message);
            return $message;
        });
    }
242381
public static function boot() {
        parent::boot();

        $myself   = get_called_class();
        $hooks    = array('before' => 'ing', 'after' => 'ed');
        $radicals = array('sav', 'validat', 'creat', 'updat', 'delet');

        foreach ($radicals as $rad) {
            foreach ($hooks as $hook => $event) {
                $method = $hook.ucfirst($rad).'e';
                if (method_exists($myself, $method)) {
                    $eventMethod = $rad.$event;
                    self::$eventMethod(function($model) use ($method){
                        return $model->$method($model);
                    });
                }
            }
        }
    }
981362
public function boot()
    {
        $this->loadTranslationsFrom(self::TRANSLATIONS_PATH, 'zxcvbn');

        $this->publishes([
            self::TRANSLATIONS_PATH => resource_path('lang/vendor/zxcvbn'),
        ]);

        $this->app->make('validator')->extend('zxcvbn', ZxcvbnValidator::class . '@validate');
    }
436613
public function boot()
    {
        foreach($this->providers as $provider => $registered)
        {
            if($registered === false)
                $this->register(new $provider);
        }
    }
331509
public function boot()
    {
        $this->getContainer()
            ->addProvider(ArraySerializerProvider::class)
            ->addProvider(JsonSerializerProvider::class)
            ->addProvider(CompressorProvider::class)
            ->addProvider(ArrayCacheDriver::class);
    }
651890
public function boot()
    {
        // Set config file
        $this->publishes([
            __DIR__.'/config/panel.php'      => config_path('panel.php'),
            __DIR__.'/config/panel/User.yml' => config_path('panel/User.yml'),
        ], 'config');

        // Set the stylesheets around
        $this->publishes([
            __DIR__.'/assets/css/panel.css'             => public_path('css/panel.css'),
            __DIR__.'/resources/assets/sass/panel.scss' => resource_path('assets/sass/panel.scss'),
        ], 'public');

        // Load routes
        if (!$this->app->routesAreCached()) {
            require __DIR__.'/http/routes.php';
        }

        // Load translation files
        $this->loadTranslationsFrom(__DIR__.'/resources/lang', 'panel');

        $this->publishes([
            __DIR__.'/resources/lang' => resource_path('lang/vendor/panel'),
        ], 'lang');

        // Load views
        $this->loadViewsFrom(__DIR__.'/views', 'panel');
    }
1128534
public function boot()
    {
        Validator::extend('beforeDateField', function ($attribute, $value, $parameters, $validator) {
            return $this->checkDate($value, $parameters, $validator, 'lt');
        });

        Validator::extend('afterDateField', function ($attribute, $value, $parameters, $validator) {
            return $this->checkDate($value, $parameters, $validator, 'gt');
        });
    }