public function getCountInBetween(Carbon $from, Carbon $until = null, $locale = null, $query = null, $cacheKey = null)
    {
        if (is_null($until))
        {
            $until = Carbon::now();
        }

        if ( ! is_null($cacheKey))
        {
            $count = $this->getCachedCountBetween($from, $until, $locale, $cacheKey);

            if ( ! is_null($count))
            {
                return $count;
            }
        }

        $query = $this->determineLocaleAndQuery($locale, $query);

        $count = $query->whereBetween('created_at', [$from, $until])->count();

        $this->cacheCountBetween($count, $from, $until, $locale, $cacheKey);

        return $count;
    }
public function getCountInBetween(Carbon $from, Carbon $until = null, $locale = null, $query = null, $cacheKey = null)
    {
        if (is_null($until))
        {
            $until = Carbon::now();
        }

        if ( ! is_null($cacheKey))
        {
            $count = $this->getCachedCountBetween($from, $until, $locale, $cacheKey);

            if ( ! is_null($count))
            {
                return $count;
            }
        }

        $query = $this->determineLocaleAndQuery($locale, $query);

        $count = $query->whereBetween('created_at', [$from, $until])->count();

        $this->cacheCountBetween($count, $from, $until, $locale, $cacheKey);

        return $count;
    }
public function getCountInBetween ( Carbon $ from , Carbon $ until = null , $ locale = null , $ query = null , $ cacheKey = null ) { if ( is_null ( $ until ) ) { $ until = Carbon :: now ( ) ; } if ( ! is_null ( $ cacheKey ) ) { $ count = $ this -> getCachedCountBetween ( $ from , $ until , $ locale , $ cacheKey ) ; if ( ! is_null ( $ count ) ) { return $ count ; } } $ query = $ this -> determineLocaleAndQuery ( $ locale , $ query ) ; $ count = $ query -> whereBetween ( 'created_at' , [ $ from , $ until ] ) -> count ( ) ; $ this -> cacheCountBetween ( $ count , $ from , $ until , $ locale , $ cacheKey ) ; return $ count ; }
Gets visit count in between dates

@param Carbon $from
@param Carbon|null $until
@param string|null $locale
@param mixed $query
@param string|null $cacheKey
@return int
Gets visit count in between dates