We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d5c99f commit bf599abCopy full SHA for bf599ab
tests/ScopedNodeTest.php
@@ -219,4 +219,12 @@ public function testInsertingBeforeAnotherScopeFails()
219
220
$a->insertAfterNode($b);
221
}
222
+
223
+ public function testEagerLoadingAncestorsWithScope()
224
+ {
225
+ $filteredNodes = MenuItem::where('title', 'menu item 3')->with(['ancestors'])->get();
226
227
+ $this->assertEquals(2, $filteredNodes->find(5)->ancestors[0]->id);
228
+ $this->assertEquals(4, $filteredNodes->find(6)->ancestors[0]->id);
229
+ }
230
0 commit comments