We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Query::utilize()
1 parent 28b9f37 commit b10693fCopy full SHA for b10693f
1 file changed
src/Query.php
@@ -312,14 +312,16 @@ public function getUtilize()
312
/**
313
* Add a relation to utilize (join)
314
*
315
- * @param string $path
+ * @param string|array $paths
316
317
* @return $this
318
*/
319
- public function utilize($path)
+ public function utilize($paths)
320
{
321
- $path = $this->getResolver()->qualifyPath($path, $this->getModel()->getTableName());
322
- $this->utilize[$path] = $this->getResolver()->resolveRelation($path);
+ foreach ((array) $paths as $path) {
+ $path = $this->getResolver()->qualifyPath($path, $this->getModel()->getTableName());
323
+ $this->utilize[$path] = $this->getResolver()->resolveRelation($path);
324
+ }
325
326
return $this;
327
}
0 commit comments