@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | public function __construct() |
| 19 | 19 | { |
| 20 | - config(['auth.model' => \plunner\Employee::class]); |
|
| 21 | - config(['jwt.user' => \plunner\Employee::class]); |
|
| 20 | + config([ 'auth.model' => \plunner\Employee::class ]); |
|
| 21 | + config([ 'jwt.user' => \plunner\Employee::class ]); |
|
| 22 | 22 | $this->middleware('jwt.authandrefresh:mode-en'); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | // |
| 64 | 64 | $employee = \Auth::user(); |
| 65 | 65 | $calendar = $employee->calendars()->create($request->only('name', 'enabled')); |
| 66 | - $calendar->caldav()->create($request->only('url','username', 'password', 'calendar_name')); |
|
| 66 | + $calendar->caldav()->create($request->only('url', 'username', 'password', 'calendar_name')); |
|
| 67 | 67 | //TODO test |
| 68 | 68 | //TODO validator |
| 69 | 69 | //TODO return caldav info |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | //TODO test |
| 102 | 102 | //TODO validator |
| 103 | 103 | //TODO check if caldav exists? |
| 104 | - $calendar->caldav()->update($request->only('url','username', 'password', 'calendar_name')); |
|
| 104 | + $calendar->caldav()->update($request->only('url', 'username', 'password', 'calendar_name')); |
|
| 105 | 105 | return $calendar; |
| 106 | 106 | } |
| 107 | 107 | |
@@ -134,9 +134,9 @@ discard block |
||
| 134 | 134 | $caldavClient->connect($request->input('url'), $request->input('username'), $request->input('password')); |
| 135 | 135 | $calendars = $caldavClient->findCalendars(); |
| 136 | 136 | return array_keys($calendars); |
| 137 | - }catch (\it\thecsea\caldav_client_adapter\CaldavException $e) |
|
| 137 | + } catch (\it\thecsea\caldav_client_adapter\CaldavException $e) |
|
| 138 | 138 | { |
| 139 | - return Response::json(['error' => $e->getMessage()],422); |
|
| 139 | + return Response::json([ 'error' => $e->getMessage() ], 422); |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | } |