Like query in laravel

hy
just use laravel search query using algolia
but is there any way to search like query
In laravel backend

1 Like

Hey @ijaz.bhatti, can you go a bit more into detail what you’re looking for?

Search on Algolia is always typo tolerant, so a search will behave as a LIKE in SQL (only more advanced). You can search in the backend as well, but we recommend using a frontend solution like Vue InstantSearch. You can also search in the Laravel backend, as described in its documentation

Hope that helps you, have a nice day!

1 Like

Thanks for time and fast reply
actually i need the like query for backend laravel
as laravel define search query which accepts a string and get exactly same record
what i want is all record contain “a”
as given in your frontend solution save records for beckend query
as i want “%a%” this query
Thanks again
for reply fast

Hey,

Because the way a search with Algolia works, literal LIKE queries are impossible, but we have prefix matching by default. What Algolia is built for is instant search. That means that on every time a user types a letter in a search bar, the results are updated with what’s currently being searched for. The Laravel Scout search part is a bridge around it, and thus doesn’t exactly follow this pattern, which might lead you to confuse it with other experiences.

What exactly is the reason you want a %a% query?