Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function __invoke(ForgotPasswordEmailRequest $request) |
||
18 | { |
||
19 | $status = Password::sendResetLink($request->only('email')); |
||
20 | |||
21 | if($status === Password::RESET_LINK_SENT) |
||
22 | { |
||
23 | event(new SuccessfulResetEmailAttempt($request->email)); |
||
24 | return back()->with([ |
||
25 | 'message' => __($status), |
||
26 | 'type' => 'success' |
||
27 | ]); |
||
28 | } |
||
29 | |||
30 | event(new FailedResetEmailAttempt($request->email)); |
||
31 | return back()->withErrors(['email' => __($status)]); |
||
32 | } |
||
34 |