i am using laravel 8 and want use like query with whereIn. it's my query:
$details = explode(" ", $request->detail);
$doctors->whereIn('specialities.title', 'like', '%' . $details . '%')
->orWhereIn('users.first_name','like',$details."%")
->orWhere('users.last_name','like',$details."%");
but i get errors:
{message: "Array to string conversion", exception: "ErrorException",…}
exception: "ErrorException" line: 39 message: "Array to string conversion"
I changed my logic and it work for me and return correct result: because i am searching records from multiple fields