title: Laravel groupBy doesn't work properly with PostgreSQL
body: <p>I have same number of rows with <code>groupBy</code> as well without it.</p>
  
  <pre><code>$authors = AuthorMask::where('company_id', $user-&gt;company_id)
          -&gt;groupBy('id', 'author_id')
          -&gt;orderBy('created_at', 'desc')
          -&gt;paginate(5);
  </code></pre>
  
  <p>If I use this:</p>
  
  <pre><code>$authors = AuthorMask::where('company_id', $user-&gt;company_id)
          -&gt;groupBy('author_id')
          -&gt;orderBy('created_at', 'desc')
          -&gt;paginate(5);
  </code></pre>
  
  <p>I get an error.</p>
  
  <blockquote>
    <p>SQLSTATE[42803]: Grouping error: 7 ERROR: column "author_masks.id" 
    must appear in the GROUP BY clause or be used in an aggregate function
    LINE 1: select * from "author_masks" where "company_id" = $1 group 
    b... ^ (SQL: select * from "author_masks" where "company_id" = 1 group
    by  "author_id" order by "created_at" desc limit 5 offset 0)</p>
  </blockquote>