@@ -37,8 +37,9 @@ |
||
| 37 | 37 | { |
| 38 | 38 | $company = \Auth::user(); |
| 39 | 39 | $input = $request->only(['name', 'password']); |
| 40 | - if (isset($input['password'])) |
|
| 41 | - $input['password'] = bcrypt($input['password']); |
|
| 40 | + if (isset($input['password'])) { |
|
| 41 | + $input['password'] = bcrypt($input['password']); |
|
| 42 | + } |
|
| 42 | 43 | $company->update($input); |
| 43 | 44 | return $company; |
| 44 | 45 | } |
@@ -37,8 +37,9 @@ |
||
| 37 | 37 | { |
| 38 | 38 | $employee = \Auth::user(); |
| 39 | 39 | $input = $request->only(['name', 'password']); |
| 40 | - if (isset($input['password'])) |
|
| 41 | - $input['password'] = bcrypt($input['password']); |
|
| 40 | + if (isset($input['password'])) { |
|
| 41 | + $input['password'] = bcrypt($input['password']); |
|
| 42 | + } |
|
| 42 | 43 | $employee->update($input); |
| 43 | 44 | return $employee; |
| 44 | 45 | } |