| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 2 | public function update(Request $request): RedirectResponse |
|
| 17 | { |
||
| 18 | 2 | $validated = $request->validateWithBag('updatePassword', [ |
|
| 19 | 2 | 'current_password' => ['required', 'current_password:seller'], |
|
| 20 | 2 | 'password' => ['required', Password::defaults(), 'confirmed'], |
|
| 21 | 2 | ]); |
|
| 22 | |||
| 23 | 1 | $request->user('seller')->update([ |
|
| 24 | 1 | 'password' => Hash::make($validated['password']), |
|
| 25 | 1 | ]); |
|
| 26 | |||
| 27 | 1 | return back()->with('status', 'password-updated'); |
|
| 28 | } |
||
| 30 |