public static function totalWatched($since = 0, $until = null)
    {
        $until = $until ?: time();

        return (int) self::whereHas('watchers', function ($query) use ($since, $until) {
            $query->where('added', '>=', $since);
            $query->where('added', '<=', $until);
        })->count();
    }
public static function totalWatched($since = 0, $until = null)
    {
        $until = $until ?: time();

        return (int) self::whereHas('watchers', function ($query) use ($since, $until) {
            $query->where('added', '>=', $since);
            $query->where('added', '<=', $until);
        })->count();
    }
public static function totalWatched ( $ since = 0 , $ until = null ) { $ until = $ until ? : time ( ) ; return ( int ) self :: whereHas ( 'watchers' , function ( $ query ) use ( $ since , $ until ) { $ query -> where ( 'added' , '>=' , $ since ) ; $ query -> where ( 'added' , '<=' , $ until ) ; } ) -> count ( ) ; }
Return the total number of watched items.

@param int $since UNIX timestamp to optionally specify a lower selection boundary.
@param int $until UNIX timestamp to optionally specify an upper selection boundary.

@return int
Return the total number of watched items .