nicolaslopezj / searchable

A php trait to search laravel models
MIT License
2.01k stars 291 forks source link

Feature proposal: Additional where equal value for each column or relation #181

Open putchi opened 5 years ago

putchi commented 5 years ago

Feature proposal:

In addition to the all "LIKE" queries generated and searched by relevance (thumbs up!) it will be very good to add a "or equal" query for the column or relation.

something like:

foreach ($this->getColumns() as $column => $relevance) { $query->orWhere($column, '=', $this->search_value); }

@nicolaslopezj what do you think? could it be done?