We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Query::utilize()
1 parent 123b7d9 commit 5e9b906Copy full SHA for 5e9b906
1 file changed
src/Query.php
@@ -283,14 +283,16 @@ public function getUtilize()
283
/**
284
* Add a relation to utilize (join)
285
*
286
- * @param string $path
+ * @param string|string[] $paths
287
288
* @return $this
289
*/
290
- public function utilize($path)
+ public function utilize($paths)
291
{
292
- $path = $this->getResolver()->qualifyPath($path, $this->getModel()->getTableName());
293
- $this->utilize[$path] = $this->getResolver()->resolveRelation($path);
+ foreach ((array) $paths as $path) {
+ $path = $this->getResolver()->qualifyPath($path, $this->getModel()->getTableName());
294
+ $this->utilize[$path] = $this->getResolver()->resolveRelation($path);
295
+ }
296
297
return $this;
298
}
0 commit comments