@@ -23,11 +23,11 @@ |
||
23 | 23 | */ |
24 | 24 | public function events() |
25 | 25 | { |
26 | - $projects = Project::where('is_archived', 0)->with(['events' => function ($query) { |
|
26 | + $projects = Project::where('is_archived', 0)->with(['events' => function($query) { |
|
27 | 27 | $query->where('end_date', '>=', new \DateTime())->orderBy('start_date', 'ASC'); |
28 | 28 | }, 'events.location'])->get(); |
29 | 29 | |
30 | - $currentProjects = $projects->filter(function ($project) { |
|
30 | + $currentProjects = $projects->filter(function($project) { |
|
31 | 31 | return $project->events->count() > 0; |
32 | 32 | })->all(); |
33 | 33 |
@@ -29,11 +29,11 @@ |
||
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 |