| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function addEagerConstraints(array $models) |
||
| 30 | { |
||
| 31 | // We'll grab the primary key name of the related models since it could be set to |
||
| 32 | // a non-standard name and not "id". We will then construct the constraint for |
||
| 33 | // our eagerly loading query so it returns the proper models from execution. |
||
| 34 | $key = $this->otherKey; |
||
| 35 | |||
| 36 | $this->query->whereIn($key, $this->getEagerModelKeys($models)); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |