title: Laravel get value by month
body: <p>I'm trying to get a value (sum) called <code>billable</code> by <code>month</code>. </p>
  
  <p>I've tried it like this:</p>
  
  <pre><code>$time = Ride::where('date', '&gt;=', Carbon::now()-&gt;firstOfYear())
                      -&gt;select('DATE_FORMAT(date, "%m") as month, sum(billabletime) as time')
                      -&gt;groupBy('month')
                      -&gt;pluck('time');
  </code></pre>
  
  <p>But when I do it like this I receive:</p>
  
  <pre><code>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'DATE_FORMAT(date,' in 'field list' (SQL: select `DATE_FORMAT(date,` as `as` from `ride` where `date` &gt;= 2016-01-01 00:00:00 group by `month`)
  </code></pre>
  
  <p>How do I get this to work (I use mysql)?</p>