File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/app/Library/CrudPanel/Traits Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 33namespace Backpack \CRUD \app \Library \CrudPanel \Traits ;
44
55use Illuminate \Database \Eloquent \Builder ;
6- use Illuminate \Support \Str ;
76
87trait Query
98{
@@ -247,9 +246,9 @@ private function getCountFromQuery(Builder $query)
247246 // - columns : we manually select the "minimum" columns possible from database.
248247 // - orders/limit/offset because we want the "full query count" where orders don't matter and limit/offset would break the total count
249248 $ subQuery = $ crudQuery ->cloneWithout (['columns ' , 'orders ' , 'limit ' , 'offset ' ]);
250-
249+
251250 $ outerQuery = $ outerQuery ->fromSub ($ subQuery ->select ($ modelTable .'. ' .$ this ->model ->getKeyName ()), $ modelTable .'_aggregator ' );
252-
251+
253252 return $ outerQuery ->cursor ()->first ()->total_rows ;
254253 }
255254}
You can’t perform that action at this time.
0 commit comments