From 8ff25c3f8abb956439d84280e12701b6bdab096c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20N=C3=BCrnberger?= Date: Sat, 10 Apr 2021 18:59:36 +0200 Subject: [PATCH] remove unnecessary wrap to avoid performance issues --- src/QueryDataTable.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/QueryDataTable.php b/src/QueryDataTable.php index fcd158b9..74f7a97e 100644 --- a/src/QueryDataTable.php +++ b/src/QueryDataTable.php @@ -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(); } /**