title: How to write query builder in laravel to search by timestamp
body: <pre><code>SELECT itemid,COUNT(itemid),itemname FROM `items` 
  WHERE DATE(`save_at`) ='2015-12-16'
  GROUP BY itemid
  </code></pre>
  
  <p>Anyone know how to write this sql in laravel 5 using query builder ???</p>
  
  <p>this is the code i used but it didn't work for me</p>
  
  <pre><code>$query = DB::table('items')
  -&gt;select(itemid, DB::raw('COUNT(itemid) as noitems')),itemname)
  -&gt;where( DATE(`save_at`),'=', 2015-12-16)
  -&gt;group_by('itemid')
  -&gt;get();
  </code></pre>