| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | public function alias(string $name, $value) |
||
| 47 | { |
||
| 48 | if (is_callable($value)) { |
||
| 49 | $this->query->when($this->includes->has($name), $value); |
||
| 50 | } else { |
||
| 51 | $this->query->when($this->includes->has($name), function (Builder $query) use ($value) { |
||
| 52 | $query->with($value); |
||
| 53 | }); |
||
| 54 | } |
||
| 55 | |||
| 56 | return $this; |
||
| 57 | } |
||
| 58 | } |
||
| 59 |