I wanted to pass all $id values to the where clause, 3rd line from the code below. but as i'am trying to return $friend it is null. am i addressing the $id values incorrectly? or i got it wrong in the query? i checked my database and it should return 2 rows.
i also checked $id by returning it and it returns what i am expecting and i guess i got it wrong in the query in $friend line.
$x = user->id;
$id = DB::table('requests')->select('id')->where('id', '=', $x)->get();
$friend = DB::table('users')->where('id', 'in', $id)->get();