Completed
Push — master ( 6807e8...093c08 )
by claudio
08:56
created
app/Http/Controllers/Employees/Meetings/MeetingsController.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Http\Request;
6 6
 
7
-use plunner\Http\Requests;
8 7
 use plunner\Http\Controllers\Controller;
9 8
 
10 9
 class GroupsController extends Controller
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function __construct()
13 13
     {
14
-        config(['auth.model' => \plunner\Employee::class]);
15
-        config(['jwt.user' => \plunner\Employee::class]);
14
+        config([ 'auth.model' => \plunner\Employee::class ]);
15
+        config([ 'jwt.user' => \plunner\Employee::class ]);
16 16
         $this->middleware('jwt.authandrefresh:mode-en');
17 17
     }
18 18
 
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
         $employee = \Auth::user();
28 28
         $meetings = $employee->meetings();
29 29
         if ($request->query('current'))
30
-            $meetings->where(function ($query) { //parenthesis for conditions ...(C1 OR C2)...
31
-                $query->where('start_time', '=', NULL);//to be planned
30
+            $meetings->where(function($query) { //parenthesis for conditions ...(C1 OR C2)...
31
+                $query->where('start_time', '=', NULL); //to be planned
32 32
                 //datetime to consider timezone, don't use mysql NOW()
33
-                $query->orWhere('start_time', '>=', new \DateTime());//planned
33
+                $query->orWhere('start_time', '>=', new \DateTime()); //planned
34 34
             });
35 35
         return $meetings->get();
36 36
     }
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,11 @@
 block discarded – undo
31 31
         $group = Group::findOrFail($groupId);
32 32
         $this->authorize($group);
33 33
         $meetings = $group->meetings();
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
34
+        if ($request->query('current')) {
35
+                    $meetings->where(function ($query) { //parenthesis for conditions ...(C1 OR C2)...
36
+                $query->where('start_time', '=', NULL);
37
+        }
38
+        //to be planned
37 39
                 //datetime to consider timezone, don't use mysql NOW()
38 40
                 $query->orWhere('start_time', '>=', new \DateTime());//planned
39 41
             });
Please login to merge, or discard this patch.