Commit fd1b76a2 authored by JoostK's avatar JoostK

Added ability to call Eloquent::with on a Relationship instance

Signed-off-by: 's avatarJoostK <joost.koehoorn@gmail.com>
parent 8ff052cb
......@@ -119,4 +119,17 @@ abstract class Relationship extends Query {
return array_unique($keys);
}
/**
* The relationships that should be eagerly loaded by the query.
*
* @param array $includes
* @return Relationship
*/
public function with($includes)
{
$this->model->includes = (array) $includes;
return $this;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment