We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86f22ab commit 1ec1e2aCopy full SHA for 1ec1e2a
tests/QueryTest.php
@@ -42,4 +42,28 @@ public function testFind()
42
$this->assertEquals('John Doe', $user['name']);
43
}
44
45
+ public function testSubKey()
46
+ {
47
+ $user1 = array(
48
+ 'name' => 'John Doe',
49
+ 'address' => array(
50
+ 'country' => 'Belgium',
51
+ 'city' => 'Ghent'
52
+ )
53
+ );
54
+
55
+ $user2 = array(
56
+ 'name' => 'Jane Doe',
57
58
+ 'country' => 'France',
59
+ 'city' => 'Paris'
60
61
62
63
+ DB::collection('users')->insert(array($user1, $user2));
64
65
+ $users = DB::collection('users')->where('address.country', 'Belgium')->get();
66
+ $this->assertEquals(1, count($users));
67
+ }
68
69
0 commit comments