| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 3 | public function store(Request $request): RedirectResponse |
|
| 27 | { |
||
| 28 | 3 | $request->validate([ |
|
| 29 | 3 | 'email' => ['required', 'email'], |
|
| 30 | 3 | ]); |
|
| 31 | |||
| 32 | // We will send the password reset link to this user. Once we have attempted |
||
| 33 | // to send the link, we will examine the response then see the message we |
||
| 34 | // need to show to the user. Finally, we'll send out a proper response. |
||
| 35 | 3 | $status = Password::broker('sellers')->sendResetLink( |
|
| 36 | 3 | $request->only('email') |
|
| 37 | 3 | ); |
|
| 38 | |||
| 39 | 3 | return $status == Password::RESET_LINK_SENT |
|
| 40 | 3 | ? back()->with('status', __($status)) |
|
| 41 | 3 | : back()->withInput($request->only('email')) |
|
| 42 | 3 | ->withErrors(['email' => __($status)]); |
|
| 43 | } |
||
| 45 |