I currently have a table of page_views that records one row for each time a visitor accesses a page, recording the user\'s ip/id and the id of the page itself. I should add
Warning: untested code.
$dailyData = DB::table('page_views') ->select('created_at', DB::raw('count(*) as views')) ->groupBy('created_at') ->get();