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.
withoutEagerLoad
1 parent dbad869 commit c24bf57Copy full SHA for c24bf57
src/Illuminate/Database/Eloquent/Builder.php
@@ -1573,6 +1573,19 @@ public function setEagerLoads(array $eagerLoad)
1573
1574
return $this;
1575
}
1576
+
1577
+ /**
1578
+ * Indicate that the given relationships should not be eagerly loaded.
1579
+ *
1580
+ * @param array $relations
1581
+ * @return $this
1582
+ */
1583
+ public function withoutEagerLoad(array $relations)
1584
+ {
1585
+ $relations = array_diff(array_keys($this->model->getRelations()), $relations);
1586
1587
+ return $this->with($relations);
1588
+ }
1589
1590
/**
1591
* Flush the relationships being eagerly loaded.
0 commit comments