|
@@ -29,11 +29,11 @@ |
|
|
block discarded – undo |
|
29
|
29
|
$deadline = new \DateTime(); |
|
30
|
30
|
$deadline->add(new \DateInterval('PT2H')); |
|
31
|
31
|
|
|
32
|
|
- $projects = Project::where('is_archived', 0)->with(['events' => function ($query) use ($deadline) { |
|
|
32
|
+ $projects = Project::where('is_archived', 0)->with(['events' => function($query) use ($deadline) { |
|
33
|
33
|
$query->where('start_date', '>=', $deadline)->orderBy('start_date', 'ASC'); |
|
34
|
34
|
}, 'events.location'])->get(); |
|
35
|
35
|
|
|
36
|
|
- $currentProjects = $projects->filter(function ($project) { |
|
|
36
|
+ $currentProjects = $projects->filter(function($project) { |
|
37
|
37
|
return $project->events->count() > 0; |
|
38
|
38
|
})->all(); |
|
39
|
39
|
|
Please login to merge, or discard this patch.