I have this:
$dbData = City::where('name', 'like', '%'.$data.'%')->limit(10)->get();
I want to prefer exact match on the first place.
Eg. searching for CAT will give CAT on first place and CATegory on second... .
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop
for days upon days, and still not see everything!