Group by not working after upgrading to laravel 5.3
<p>This is the code that was working on laravel 5.2</p>

<pre><code>$menus = CmsMenuItem::groupBy('menu_id')-&gt;get();
</code></pre>

<p>but now it throws error</p>

<blockquote>
  <p>SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1
  of SELECT list is not in GROUP BY clause and contains nonaggregated
  column 'convertifier_cms.cms_menu_items.id' which is not functionally
  dependent on columns in GROUP BY clause; this is incompatible with
  sql_mode=only_full_group_by (SQL: select * from 'cms_menu_items' group
  by 'menu_id')</p>
</blockquote>

<p>I have also tried</p>

<pre><code> `strict =&gt; false` 
</code></pre>

<p>in database.php but no effect</p>