protected function ban()
    {
        $rule             = Rule::firstOrNew([
                    'value'           => request()->getClientIp(),
                    'trusted'         => 0,
                    'internal_reason' => trans('antares/ban_management::messages.too_many_requests'),
                    'reason'          => trans('antares/ban_management::messages.too_many_requests'),
        ]);
        $rule->expired_at = time() + array_get($this->config, 'enable_after', 60);
        $rule->status     = 1;
        $rule->enabled    = 1;
        return $this->repository->store($rule);
    }
protected function ban()
    {
        $rule             = Rule::firstOrNew([
                    'value'           => request()->getClientIp(),
                    'trusted'         => 0,
                    'internal_reason' => trans('antares/ban_management::messages.too_many_requests'),
                    'reason'          => trans('antares/ban_management::messages.too_many_requests'),
        ]);
        $rule->expired_at = time() + array_get($this->config, 'enable_after', 60);
        $rule->status     = 1;
        $rule->enabled    = 1;
        return $this->repository->store($rule);
    }
protected function ban ( ) { $ rule = Rule :: firstOrNew ( [ 'value' => request ( ) -> getClientIp ( ) , 'trusted' => 0 , 'internal_reason' => trans ( 'antares/ban_management::messages.too_many_requests' ) , 'reason' => trans ( 'antares/ban_management::messages.too_many_requests' ) , ] ) ; $ rule -> expired_at = time ( ) + array_get ( $ this -> config , 'enable_after' , 60 ) ; $ rule -> status = 1 ; $ rule -> enabled = 1 ; return $ this -> repository -> store ( $ rule ) ; }
Bans when too many requests per second

@return mixed
Bans when too many requests per second