public function boot()
    {
        parent::boot();
        $router = $this->app->make(Router::class);
        $this->app->make('view')->composer('antares/ban_management::*', BansPlaceholder::class);

        if ($this->app->make(Config::class)->hasCookieTracking()) {
            $router->pushMiddlewareToGroup('web', CookieBanMiddleware::class);
        }

        $router->pushMiddlewareToGroup('web', ThrottleRequestsMiddleware::class);
        $router->pushMiddlewareToGroup('web', FirewallMiddleware::class);
        $router->pushMiddlewareToGroup('web', BannedEmailMiddleware::class);

        $this->extendValidator();
        $this->registerModelsEvents();
        $this->runDDoSProtection();
    }
public function boot()
    {
        parent::boot();
        $router = $this->app->make(Router::class);
        $this->app->make('view')->composer('antares/ban_management::*', BansPlaceholder::class);

        if ($this->app->make(Config::class)->hasCookieTracking()) {
            $router->pushMiddlewareToGroup('web', CookieBanMiddleware::class);
        }

        $router->pushMiddlewareToGroup('web', ThrottleRequestsMiddleware::class);
        $router->pushMiddlewareToGroup('web', FirewallMiddleware::class);
        $router->pushMiddlewareToGroup('web', BannedEmailMiddleware::class);

        $this->extendValidator();
        $this->registerModelsEvents();
        $this->runDDoSProtection();
    }
public function boot ( ) { parent :: boot ( ) ; $ router = $ this -> app -> make ( Router :: class ) ; $ this -> app -> make ( 'view' ) -> composer ( 'antares/ban_management::*' , BansPlaceholder :: class ) ; if ( $ this -> app -> make ( Config :: class ) -> hasCookieTracking ( ) ) { $ router -> pushMiddlewareToGroup ( 'web' , CookieBanMiddleware :: class ) ; } $ router -> pushMiddlewareToGroup ( 'web' , ThrottleRequestsMiddleware :: class ) ; $ router -> pushMiddlewareToGroup ( 'web' , FirewallMiddleware :: class ) ; $ router -> pushMiddlewareToGroup ( 'web' , BannedEmailMiddleware :: class ) ; $ this -> extendValidator ( ) ; $ this -> registerModelsEvents ( ) ; $ this -> runDDoSProtection ( ) ; }
Boot the extension.
Boot the extension .