@@ 159-164 (lines=6) @@ | ||
156 | } |
|
157 | ||
158 | $query->with([ |
|
159 | 'issues' => function (Relations\Relation $query) use ($status) { |
|
160 | $query->with('updatedBy'); |
|
161 | if ($status === Project::STATUS_OPEN) { |
|
162 | $query->where('status', '=', Project\Issue::STATUS_OPEN); |
|
163 | } |
|
164 | }, |
|
165 | 'issues.user' => function () { |
|
166 | }, |
|
167 | 'issues.countComments' => function () { |
@@ 90-96 (lines=7) @@ | ||
87 | return $this |
|
88 | ->projects($status) |
|
89 | ->with([ |
|
90 | 'issues' => function (Relations\Relation $query) use ($status, $assignedOrCreate) { |
|
91 | $query->with('updatedBy'); |
|
92 | $query->where($assignedOrCreate, '=', $this->id); |
|
93 | if ($status === Project::STATUS_OPEN) { |
|
94 | $query->where('status', '=', Project\Issue::STATUS_OPEN); |
|
95 | } |
|
96 | }, |
|
97 | 'issues.user' => function () {}, |
|
98 | 'issues.countComments' => function () {}, |
|
99 | ]); |