I am using
"jenssegers/mongodb": "3.2.*"
my query is like below,
$query= DB::connection('mongodb')->collection('folder_master')
->where('email_account_id',1)->get();
it is not giving me any result though there is value present in database.
if I am using query as below
$query= DB::connection('mongodb')->collection('folder_master')->get();
then it is giving me all the records but where condition is not working.
my expected result is below,
Array
(
[0] => Array
(
[_id] => MongoDB\BSON\ObjectId Object
(
[oid] => 5bea89ac19f043251000347d
)
[0] => Array
(
[folder_name] => Archive
[status] => Active
[primary_folder] => 0
[email_account_id] => 1
[created_at] => Array
(
[date] => 2018-11-13 08:22:04.000000
[timezone_type] => 3
[timezone] => UTC
)
[created_by] => 0
)
)
)
is there any issue while storing in database ????
here is the json which is stored in mongodb
{
"_id" : ObjectId("5bea89ac19f043251000347d"),
"0" : {
"folder_name" : "Archive",
"status" : "Active",
"primary_folder" : NumberInt(0),
"email_account_id" : NumberInt(1),
"created_at" : {
"date" : "2018-11-13 08:22:04.000000",
"timezone_type" : NumberInt(3),
"timezone" : "UTC"
},
"created_by" : NumberInt(0)
}
}
please help me to resolve this type of issue