Group by not working - Laravel : <p>I'm not able to run this simple query in Laravel 5.3</p>

<pre><code>$top_performers = DB::table('pom_votes')
        -&gt;groupBy('performer_id')
        -&gt;get();
</code></pre>

<p>It gives me:</p>

<pre><code>SQLSTATE[42000]: Syntax error or access violation: 1055 'assessment_system.pom_votes.id' isn't in GROUP BY (SQL: select * from `pom_votes` group by `performer_id`)
</code></pre>

<p>However if I copy raw query from the error and fire directly in PhpMyAdmin, it works fine.</p>

<p>I have already checked this:</p>

<p><a href="https://laravel.com/docs/5.3/queries#ordering-grouping-limit-and-offset" rel="noreferrer">https://laravel.com/docs/5.3/queries#ordering-grouping-limit-and-offset</a></p>

<p>Any help would be appricaited.</p>

<p>Thanks,</p>

<p>Parth Vora</p>
