your problem is elsewhere, not in the code you show.
Can you show more code
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi i want to run the query "SELECT * FROM users WHERE author = 'mubeen' AND name LIKE '%$veriable%' i am getting error like Object of class Symfony\Component\HttpFoundation\ParameterBag could not be converted to string.. Please help me
$query = $request->query;
$users = User::where([
['author', 'superAdmin'],
['name' ,'LIKE',"%$query%"],
])->orderBy('created_at','desc')->paginate(4);
rename your input field to something other than query. I suspect you are conflicting with another request property
Please or to participate in this conversation.