File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,17 @@ public function __call($method, $parameters)
249249 */
250250 public function search ($ searchStr )
251251 {
252- $ query = $ this ->searcher ()->search ($ searchStr );
252+ return $ this ->searcher ()->search ($ searchStr );
253+ }
254+
255+ /**
256+ * Prepare and return the searchable query.
257+ *
258+ * @return \Illuminate\Database\Eloquent\Builder
259+ */
260+ protected function searchableQuery ()
261+ {
262+ $ query = $ this ->makeQuery ();
253263
254264 if ($ this ->paginated ) {
255265 $ query ->limit ($ this ->pageLimitter ()->limit ());
@@ -267,8 +277,8 @@ public function search($searchStr)
267277 public function searcher ()
268278 {
269279 return new SublimeSearch (
270- $ this ->makeQuery (),
271- $ this ->columnKeys (),
280+ $ this ->searchableQuery (),
281+ $ this ->searchOperator === ' having ' ? $ this -> columnKeys () : array_values ( $ this -> columns () ),
272282 true ,
273283 method_exists ($ this , 'sortColumns ' ) ? $ this ->sortColumns () : $ this ->columns (),
274284 $ this ->searchOperator
You can’t perform that action at this time.
0 commit comments