title: Laravel Eloquent get results grouped by days
body: <p>I currently have a table of <code>page_views</code> 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 that the <code>created_at</code> column is of type: <em>timestamp</em>, so it includes the hours/minutes/seconds. When I try <code>groupBy</code> queries, it does not group same days together because of the seconds difference.</p>
  <pre><code>created_at         page_id       user_id
  ==========         =======       =======
  10-11-2013            3            1
  10-12 2013            5            5
  10-13 2013            5            2
  10-13 2013            3            4
    ...                ...          ...
  </code></pre>
  <p>I'd like to get results based on views/day, so I can get something like:</p>
  <pre><code>  date          views
    ====          =====
  10-11-2013       15
  10-12 2013       45
    ...            ...
  </code></pre>
  <p>I'm thinking I'll need to dig into <code>DB::raw()</code> queries to achieve this, but any insight would help greatly, thanks</p>
  <p>Edit: Added clarification of <code>created_at</code> format.</p>