@@ -13,8 +13,8 @@ discard block |
||
13 | 13 | { |
14 | 14 | public function __construct() |
15 | 15 | { |
16 | - config(['auth.model' => \plunner\Planner::class]); |
|
17 | - config(['jwt.user' => \plunner\Planner::class]); |
|
16 | + config([ 'auth.model' => \plunner\Planner::class ]); |
|
17 | + config([ 'jwt.user' => \plunner\Planner::class ]); |
|
18 | 18 | $this->middleware('jwt.authandrefresh:mode-en'); |
19 | 19 | } |
20 | 20 | |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | $this->authorize($group); |
33 | 33 | $meetings = $group->meetings(); |
34 | 34 | if ($request->query('current')) |
35 | - $meetings->where(function ($query) { //parenthesis for conditions ...(C1 OR C2)... |
|
36 | - $query->where('start_time', '=', NULL);//to be planned |
|
35 | + $meetings->where(function($query) { //parenthesis for conditions ...(C1 OR C2)... |
|
36 | + $query->where('start_time', '=', NULL); //to be planned |
|
37 | 37 | //datetime to consider timezone, don't use mysql NOW() |
38 | - $query->orWhere('start_time', '>=', new \DateTime());//planned |
|
38 | + $query->orWhere('start_time', '>=', new \DateTime()); //planned |
|
39 | 39 | }); |
40 | 40 | |
41 | 41 | return $meetings->get(); |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | { |
13 | 13 | public function __construct() |
14 | 14 | { |
15 | - config(['auth.model' => Planner::class]); |
|
16 | - config(['jwt.user' => Planner::class]); |
|
15 | + config([ 'auth.model' => Planner::class ]); |
|
16 | + config([ 'jwt.user' => Planner::class ]); |
|
17 | 17 | $this->middleware('jwt.authandrefresh:mode-en'); |
18 | 18 | } |
19 | 19 | |
@@ -32,16 +32,16 @@ discard block |
||
32 | 32 | $planner = \Auth::user(); |
33 | 33 | $groups = $planner->groupsManaged(); |
34 | 34 | if ($request->query('current')) |
35 | - $groups->with(['meetings' => function ($query) { |
|
36 | - $query->where(function ($query) { //parenthesis for conditions ...(C1 OR C2)... |
|
37 | - $query->where('start_time', '=', NULL);//to be planned |
|
35 | + $groups->with([ 'meetings' => function($query) { |
|
36 | + $query->where(function($query) { //parenthesis for conditions ...(C1 OR C2)... |
|
37 | + $query->where('start_time', '=', NULL); //to be planned |
|
38 | 38 | //datetime to consider timezone, don't use mysql NOW() |
39 | - $query->orWhere('start_time', '>=', new \DateTime());//planned |
|
39 | + $query->orWhere('start_time', '>=', new \DateTime()); //planned |
|
40 | 40 | }); |
41 | - }]); |
|
41 | + } ]); |
|
42 | 42 | else |
43 | 43 | $groups->with('meetings'); |
44 | - return $groups->get();//both planed and to be planned |
|
44 | + return $groups->get(); //both planed and to be planned |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |