| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function __invoke(EmailVerificationRequest $request): RedirectResponse |
||
| 16 | { |
||
| 17 | if ($request->user('{{singularSlug}}')->hasVerifiedEmail()) { |
||
| 18 | return redirect()->intended( |
||
| 19 | config('app.frontend_url') . '/{{singularSlug}}?verified=1' |
||
| 20 | ); |
||
| 21 | } |
||
| 22 | |||
| 23 | if ($request->user('{{singularSlug}}')->markEmailAsVerified()) { |
||
| 24 | event(new Verified($request->user('{{singularSlug}}'))); |
||
| 25 | } |
||
| 26 | |||
| 27 | return redirect()->intended( |
||
| 28 | config('app.frontend_url') . '/{{singularSlug}}?verified=1' |
||
| 29 | ); |
||
| 32 |