@@ 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 () { |
@@ 73-79 (lines=7) @@ | ||
70 | return $this |
|
71 | ->projects($status) |
|
72 | ->with([ |
|
73 | 'issues' => function (Relations\Relation $query) use ($status) { |
|
74 | $query->with('updatedBy'); |
|
75 | $query->where('assigned_to', '=', $this->id); |
|
76 | if ($status === Project::STATUS_OPEN) { |
|
77 | $query->where('status', '=', Project\Issue::STATUS_OPEN); |
|
78 | } |
|
79 | }, |
|
80 | 'issues.user' => function () {}, |
|
81 | 'issues.countComments' => function () {}, |
|
82 | ]); |