protected function shouldRecord(): bool
    {
        // If ignore bots is true and the current viewer is a bot, return false
        if (config('eloquent-viewable.ignore_bots') && $this->crawlerDetector->isCrawler()) {
            return false;
        }

        // If we honor to the DNT header and the current request contains the
        // DNT header, return false
        if (config('eloquent-viewable.honor_dnt', false) && $this->requestHasDoNotTrackHeader()) {
            return false;
        }

        if (collect(config('eloquent-viewable.ignored_ip_addresses'))->contains($this->resolveIpAddress())) {
            return false;
        }

        if (! is_null($this->sessionDelay) && ! $this->viewSessionHistory->push($this->viewable, $this->sessionDelay)) {
            return false;
        }

        return true;
    }
protected function shouldRecord(): bool
    {
        // If ignore bots is true and the current viewer is a bot, return false
        if (config('eloquent-viewable.ignore_bots') && $this->crawlerDetector->isCrawler()) {
            return false;
        }

        // If we honor to the DNT header and the current request contains the
        // DNT header, return false
        if (config('eloquent-viewable.honor_dnt', false) && $this->requestHasDoNotTrackHeader()) {
            return false;
        }

        if (collect(config('eloquent-viewable.ignored_ip_addresses'))->contains($this->resolveIpAddress())) {
            return false;
        }

        if (! is_null($this->sessionDelay) && ! $this->viewSessionHistory->push($this->viewable, $this->sessionDelay)) {
            return false;
        }

        return true;
    }
protected function shouldRecord ( ) : bool { // If ignore bots is true and the current viewer is a bot, return false if ( config ( 'eloquent-viewable.ignore_bots' ) && $ this -> crawlerDetector -> isCrawler ( ) ) { return false ; } // If we honor to the DNT header and the current request contains the // DNT header, return false if ( config ( 'eloquent-viewable.honor_dnt' , false ) && $ this -> requestHasDoNotTrackHeader ( ) ) { return false ; } if ( collect ( config ( 'eloquent-viewable.ignored_ip_addresses' ) ) -> contains ( $ this -> resolveIpAddress ( ) ) ) { return false ; } if ( ! is_null ( $ this -> sessionDelay ) && ! $ this -> viewSessionHistory -> push ( $ this -> viewable , $ this -> sessionDelay ) ) { return false ; } return true ; }
Determine if we should record the view.

@return bool
Determine if we should record the view .