code: public static function interval($startDate, $endDate){
  
          $hits = DB::table('views')->select('id', 'ip', 'created_at')->whereBetween('created_at', [$startDate, $endDate])->groupBy('ip')->get();
  
          return count($hits);
      }
docs: Returns the unique hits for the given date interval.
  
  @param $startDate
  @param $endDate
  @return int