Hi @afoysal
Are you sure that the result is wrong?
Can you do a dd($request->letter) before the query to check how are you filtering?
It seems to me that you might be passing a 'c' on $request->letter in which case the result is perfect.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
My Query is like below
$addressess = Address::where('first_name', 'LIKE', $request->letter.'%')->where('user_id', Auth::id())->get();
My Table is like below

My result is like below

Why I am not getting all the records of user_id 1 ?
I am getting 1 record less.
@afoysal you have 4 records with that user_id but your query is asking for those with user_id = 1 AND with first_name starting with that letter 'c'
So, in this case, 1 of those 4 records doesn't meet the criteria as the name is 'Paul', which starts with a 'P' and not a 'c'.
Please or to participate in this conversation.