Closed pierrocknroll closed 5 years ago
Wouldn’t something like Tags::whereLike(‘name’, ‘lorem%’)->get()
work?
On Jan 29, 2018, at 10:25 AM, pierrocknroll notifications@github.com wrote:
Hello,
I'm wondering how to implement with efficienty a functionality to search through tags for an autocomplete field. For exemple localhost/tags?query=lorem searches all tags who starts by lorem
I haven't seen such a thing in your readme.
Thanks !
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Yeah, of course ! I rather thought about implemeting it with Scout. Or something like Model::allTags()->search('lorem') because I need to search through tags of a specific model
I try to do something like : Model::allTagModels()->where('name', 'LIKE', 'lorem%').
But your methods always return a Collection (with Tag::fromQuery($sql)). Is it possible to have a method who returns a QueryBuilder ? Or another way to add SQL to your queries.
I only need to search through tags of a specific model
Thanks
Yeah, it's not ideal, I agree. This package needs a bit of attention and probably a bit of a rewrite.
any news on this?
No news on this. I'd have a lot of backwards-compatibility issues returning a QueryBuilder instead of a Collection, were I to change that without a major version change.
I've marked this ticket as enhancement
so that when I do get around to rewriting it, I will keep this in mind.
Hello,
I'm wondering how to implement with efficienty a functionality to search through tags for an autocomplete field. For exemple localhost/tags?query=lorem searches all tags who start by lorem
I haven't seen such a thing in your readme.
Thanks !