Check if the string match with JSON data in Laravel
$data = Conversation::whereRaw('json_contains(users, \'["' . $id . '"]\')')->get();
if( $data->isEmpty() ){
return response()->json(['status' => 400, 'data' => 'Data not found'] );
}
return response()->json(['status' => 200, 'data' => $data] );