| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function __invoke(PasswordPolicyRequest $request) |
||
| 16 | { |
||
| 17 | // Set the new password policy expiration timer |
||
| 18 | AppSettings::firstOrCreate( |
||
| 19 | ['key' => 'auth.passwords.settings.expire'], |
||
| 20 | ['key' => 'auth.passwords.settings.expire', 'value' => $request->password_expires], |
||
| 21 | )->update([ |
||
| 22 | 'value' => $request->password_expires |
||
| 23 | ]); |
||
| 24 | |||
| 25 | // TODO - Event that sets or clears all users password expiration dates |
||
| 26 | |||
| 27 | event(new PasswordPolicyUpdatedEvent($request->password_expires)); |
||
| 28 | return back()->with([ |
||
| 29 | 'message' => 'Password Policy Updated', |
||
| 30 | 'type' => 'success', |
||
| 31 | ]); |
||
| 34 |