Skip to content

Commit 8ff25c3

Browse files
committed
remove unnecessary wrap to avoid performance issues
1 parent 53b3f85 commit 8ff25c3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/QueryDataTable.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,7 @@ protected function filteredCount()
210210
*/
211211
public function count()
212212
{
213-
$builder = $this->prepareCountQuery();
214-
$table = $this->connection->raw('(' . $builder->toSql() . ') count_row_table');
215-
216-
return $this->connection->table($table)
217-
->setBindings($builder->getBindings())
218-
->count();
213+
return $this->prepareCountQuery()->count();
219214
}
220215

221216
/**

0 commit comments

Comments
 (0)