title: Laravel 5.3 groupBy() Broken?
body: <p>The following query works in Laravel 5.2 but not in Laravel 5.3.</p>
  
  <pre><code>$messages = Message::with('sender.profile', 'recipient.profile')
      -&gt;where('sender_id', 1)
      -&gt;orWhere('recipient_id', 1)
      -&gt;groupBy('thread')
      -&gt;get();
  </code></pre>
  
  <p>When run in 5.3 I receive the following error message</p>
  
  <pre><code>SQLSTATE[42000]: Syntax error or access violation: 1055
  'tmp_laravel.messages.id' isn't in GROUP BY (SQL: select * from `messages` 
  where `sender_id` = 1 or `recipient_id` = 1 group by `thread`)
  </code></pre>
  
  <p>Now, before you say it's a database issue, remember: this same query works in Laravel 5.2 on the <strong>same</strong> database. So if it was my version of MariaDB acting up it certainly shouldn't work in L5.2, right?</p>
  
  <p>Plus, if I run the query directly in Sequel Pro it works.</p>
  
  <p>In fact, just to be sure it wasn't something I did when upgrading my app I installed two fresh copies of Laravel: 5.2 and 5.3. and installed the exact same code in each so that they would be identical as far as controllers, models, routes, .env, etc., then ran the query again in each version. Same results: works in L5.2 and breaks in L5.3.</p>