title: Laravel groupBy is not working throwing error Syntax error or access violation: 1055
body: <p>I have tried solutions in other questions but that is not solving my issue. I have made <strong>strict</strong> from <strong>true</strong> to <strong>false</strong>. Used modes</p>
  <pre><code>'modes' =&gt; [           
      'STRICT_TRANS_TABLES',
      'NO_ZERO_IN_DATE',
      'NO_ZERO_DATE',
      'ERROR_FOR_DIVISION_BY_ZERO',
      'NO_AUTO_CREATE_USER',
      'NO_ENGINE_SUBSTITUTION'
  ] 
  </code></pre>
  <p>as well. But I am getting the same error.</p>
  <pre><code>$orders = Order::orderBy('id', 'desc')-&gt;groupBy('order_id')-&gt;get();
  dd($orders);
  </code></pre>
  <p>This is throwing the error</p>
  <blockquote>
  <p>Syntax error or access violation: 1055 'my_db.orders.id' isn't in GROUP BY (SQL: select * from <code>orders</code> group by <code>order_id</code> order by <code>id</code> desc)</p>
  </blockquote>
  <p>(I am using Laravel 5.6)</p>