mahmoudtrageh
1 month ago
100
0
Laravel

I want to pick up user data from this firestore filter output

Posted 1 month ago by mahmoudtrageh

query: array:3 [ "from" => array:1 [ 0 => array:1 [ "collectionId" => "users" ] ] "where" => array:1 [ "compositeFilter" => array:2 [ "op" => 1 "filters" => array:1 [ 0 => array:1 [ "fieldFilter" => array:3 [ "field" => array:1 [ "fieldPath" => "Ahmed Mahdy" ] "op" => 7 "value" => array:1 [ "mapValue" => array:1 [ "fields" => array:4 [ "name" => array:1 [ ] "fields" => array:1 [ "mapValue" => array:1 [ "fields" => array:28 [ "credit" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0.00" ] ] ] ] "email" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "" ] ] ] ] "stripe_id" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "cus_HubVy660SwvG22" ] ] ] ] "image_url" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ ] ] ] ] "gender" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "integerValue" => array:1 [ "stringValue" => "1" ] ] ] ] "name" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "Ahmed ‎Mahdy" ] ] ] ] "contacts_count" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "integerValue" => array:1 [ "stringValue" => "3" ] ] ] ] "online" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "booleanValue" => array:1 [ "booleanValue" => true ] ] ] ] "received_gift" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "booleanValue" => array:1 [ "booleanValue" => false ] ] ] ] "data" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ ] ] ] ] "pro_flag" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "booleanValue" => array:1 [ "booleanValue" => false ] ] ] ] "call_request_price" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0.00" ] ] ] ] "phone" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "+966541562354" ] ] ] ] "profile_progress_percentage" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "doubleValue" => array:1 [ "doubleValue" => 71.428571428571 ] ] ] ] "last_login" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "timestampValue" => array:1 [ "stringValue" => "2020-08-27T14:41:40.508Z" ] ] ] ] "call_price" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0.00" ] ] ] ] "hot_number" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "integerValue" => array:1 [ "stringValue" => "351895" ] ] ] ] "id" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0PiDsmZhrohDLEb5LK3VRSOLv1L2" ] ] ] ] "free_request" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "booleanValue" => array:1 [ "booleanValue" => false ] ] ] ] "earnings" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "stringValue" => array:1 [ "stringValue" => "0.00" ] ] ] ] "created_at" => array:1 [ "mapValue" => array:1 [ "fields" => array:1 [ "timestampValue" => array:1 [ "stringValue" => "2020-08-27T14:41:40.508Z" ] ] ] ]

this is my controller code

$citiesRef = $db->collection('users'); $containsQuery = $citiesRef->where($query, 'array-contains', $user);

Please sign in or create an account to participate in this conversation.