@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | { |
| 11 | 11 | public function __construct() |
| 12 | 12 | { |
| 13 | - config(['auth.model' => \plunner\Employee::class]); |
|
| 14 | - config(['jwt.user' => \plunner\Employee::class]); |
|
| 13 | + config([ 'auth.model' => \plunner\Employee::class ]); |
|
| 14 | + config([ 'jwt.user' => \plunner\Employee::class ]); |
|
| 15 | 15 | $this->middleware('jwt.authandrefresh:mode-en'); |
| 16 | 16 | } |
| 17 | 17 | |
@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | public function update(EmployeeRequest $request) |
| 37 | 37 | { |
| 38 | 38 | $employee = \Auth::user(); |
| 39 | - $input = $request->only(['name', 'password']); |
|
| 39 | + $input = $request->only([ 'name', 'password' ]); |
|
| 40 | 40 | //TODO authorize??? |
| 41 | - if (isset($input['password'])) |
|
| 42 | - $input['password'] = bcrypt($input['password']); |
|
| 41 | + if (isset($input[ 'password' ])) |
|
| 42 | + $input[ 'password' ] = bcrypt($input[ 'password' ]); |
|
| 43 | 43 | $employee->update($input); |
| 44 | 44 | return $employee; |
| 45 | 45 | } |