Skip to content

Commit

Permalink
Merge pull request #2608 from nuernbergerA/remove-unnecessary-wrap
Browse files Browse the repository at this point in the history
[9.x] Remove unnecessary wrap to avoid performance issues
  • Loading branch information
yajra authored Apr 12, 2021
2 parents 53b3f85 + 8ff25c3 commit 22f5683
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/QueryDataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,7 @@ protected function filteredCount()
*/
public function count()
{
$builder = $this->prepareCountQuery();
$table = $this->connection->raw('(' . $builder->toSql() . ') count_row_table');

return $this->connection->table($table)
->setBindings($builder->getBindings())
->count();
return $this->prepareCountQuery()->count();
}

/**
Expand Down

0 comments on commit 22f5683

Please sign in to comment.