title: Laravel group by not working
body: <p>I have table with attributes. Table has columns: <code>attr_id</code>, <code>value</code>.
  I want group records by <code>attr_id</code> and prevent duplicates, because in table can be multiple <code>attr_id</code> with: 3,2,1 ids. I need to show list of this attributes grouped by attr_id.</p>
  
  <p>How can I do this?</p>
  
  <pre><code>$attrs = Attribute::groupBy('attr_id')-&gt;get();
  </code></pre>
  
  <p>not working.</p>
  
  <p>Error:</p>
  
  <pre><code>SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'db.attributes.value' which is not functionally dependent on columns
  </code></pre>