| @@ 158-163 (lines=6) @@ | ||
| 155 | } |
|
| 156 | ||
| 157 | $query->with([ |
|
| 158 | 'issues' => function (Relations\Relation $query) use ($status) { |
|
| 159 | $query->with('updatedBy'); |
|
| 160 | if ($status === Project::STATUS_OPEN) { |
|
| 161 | $query->where('status', '=', Project\Issue::STATUS_OPEN); |
|
| 162 | } |
|
| 163 | }, |
|
| 164 | 'issues.user' => function () { |
|
| 165 | }, |
|
| 166 | 'issues.countComments' => function () { |
|
| @@ 76-82 (lines=7) @@ | ||
| 73 | return $this |
|
| 74 | ->projects($status) |
|
| 75 | ->with([ |
|
| 76 | 'issues' => function (Relations\Relation $query) use ($status, $assignedOrCreate) { |
|
| 77 | $query->with('updatedBy'); |
|
| 78 | $query->where($assignedOrCreate, '=', $this->id); |
|
| 79 | if ($status === Project::STATUS_OPEN) { |
|
| 80 | $query->where('status', '=', Project\Issue::STATUS_OPEN); |
|
| 81 | } |
|
| 82 | }, |
|
| 83 | 'issues.user' => function () {}, |
|
| 84 | 'issues.countComments' => function () {}, |
|
| 85 | ]); |
|