title: Laravel groupBy and raw queries
body: <p>I have never really worked with groupBy or raw queries, especially for a long time. I am just wondering if the following is possible:</p>
  
  <pre><code>$payments = Payment::all();
  
  $grouped = $payments-&gt;groupBy('date');
  
  dd($grouped-&gt;toArray());
  </code></pre>
  
  <p>The above will give me the following output:</p>
  
  <pre><code>"2018-08-21" =&gt; array:1 [▶]
  "2018-06-21" =&gt; array:1 [▶]
  </code></pre>
  
  <p>What I want to do, is grab the data like this:</p>
  
  <pre><code>"2018-08-21" =&gt; array:2 [▶]
  </code></pre>
  
  <p>So basically I want to turn the months into the current month, and then group the data by the day. In the above example, the date <code>21-06-2018</code> has changed to <code>21-08-2018</code> and it was grouped with the other date on the 21st.</p>
  
  <p>So to simply put, I just want to group the results by the day of my date column, whilst ignoring the months and years. Is this possible with a (raw) query, or should I manipulate the data afterwards?</p>