signetplanet
signetplanet
FFilament
Created by vothanh4231 on 10/19/2023 in #❓┊help
I want to search for an exact phrase from the "customers" table
Got some time to put this together and created the PR. I wrapped it so the [null] will not happen so it should have no compatibility issues from what I've seen and tested. https://github.com/filamentphp/filament/pull/9291
9 replies
FFilament
Created by vothanh4231 on 10/19/2023 in #❓┊help
I want to search for an exact phrase from the "customers" table
Forgot to include your name in the reply so perhaps you didn't see my response above. Just wanted to make sure you got it.
9 replies
FFilament
Created by vothanh4231 on 10/19/2023 in #❓┊help
I want to search for an exact phrase from the "customers" table
*Note: I didn't test any of this, so if you are going to do a merge request, I expect it will require testing.
9 replies
FFilament
Created by vothanh4231 on 10/19/2023 in #❓┊help
I want to search for an exact phrase from the "customers" table
I was planning on starting a discussion and making a merge request but I'm still checking out the library and haven't committed to it yet.
9 replies
FFilament
Created by vothanh4231 on 10/19/2023 in #❓┊help
I want to search for an exact phrase from the "customers" table
I was looking at this earlier, and I noticed the same thing in that extractTableSearchWords() doesn't allow for quotes. So putting in "firstname lastname" for example will have it return an array of two values "firstname and lastname". I think this could be quickly resolved by changing the line of code in the extractTableSearchWords() method from
return explode(' ', preg_replace('/\s+/', ' ', $search));
return explode(' ', preg_replace('/\s+/', ' ', $search));
to:
return str_getcsv(preg_replace('/\s+/', ' ', $search), ' ');
return str_getcsv(preg_replace('/\s+/', ' ', $search), ' ');
9 replies