You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue came when this library creating multiple group by and if db has $prefix then it append two times because getColumns() calls twice in SearchableTrait
First in scopeSearchRestricted() function and secondly in makeGroupBy() functions
I found a solution that we need to replace code from line 209 to 2016 with below code $prefix = Config::get("database.connections.$driver.prefix"); foreach ($this->getColumns() as $column => $relevance) { array_map(function ($join) use ($column, $query, $prefix) { if (Str::contains($column, $join)) { $column = str_replace($prefix, "", $column); $query->groupBy($column); } }, $joins); }
This resolves the issue. @nicolaslopezj can you please make these changes to the library
The text was updated successfully, but these errors were encountered:
This issue came when this library creating multiple group by and if db has $prefix then it append two times because getColumns() calls twice in SearchableTrait
First in scopeSearchRestricted() function and secondly in makeGroupBy() functions
I found a solution that we need to replace code from line 209 to 2016 with below code
$prefix = Config::get("database.connections.$driver.prefix"); foreach ($this->getColumns() as $column => $relevance) { array_map(function ($join) use ($column, $query, $prefix) { if (Str::contains($column, $join)) { $column = str_replace($prefix, "", $column); $query->groupBy($column); } }, $joins); }
This resolves the issue. @nicolaslopezj can you please make these changes to the library
The text was updated successfully, but these errors were encountered: