Skip to content

Commit

Permalink
set/reset the select to from.*
Browse files Browse the repository at this point in the history
* wrapping a join with the same table column name produces a duplicate column error
  • Loading branch information
patrickomeara authored and taylorotwell committed May 6, 2020
1 parent 8b9a31b commit 858f454
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Illuminate/Database/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2280,7 +2280,8 @@ protected function runPaginationCountQuery($columns = ['*'])
*/
protected function cloneForPaginationCount()
{
return $this->cloneWithout(['orders', 'limit', 'offset'])
return $this->select($this->from.'.*')
->cloneWithout(['orders', 'limit', 'offset'])
->cloneWithoutBindings(['order']);
}

Expand Down

0 comments on commit 858f454

Please sign in to comment.