@@ -4,7 +4,6 @@ |
||
| 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 |
@@ -11,8 +11,8 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -31,9 +31,11 @@ |
||
| 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 | }); |