Total Complexity | 2 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class EmailVerificationNotificationController extends Controller |
||
11 | { |
||
12 | /** |
||
13 | * Send a new email verification notification. |
||
14 | */ |
||
15 | public function store(Request $request): JsonResponse|RedirectResponse |
||
16 | { |
||
17 | if ($request->user('{{singularSlug}}')->hasVerifiedEmail()) { |
||
18 | return redirect()->intended('/{{singularSlug}}'); |
||
19 | } |
||
20 | |||
21 | $request->user('{{singularSlug}}')->sendEmailVerificationNotification(); |
||
22 | |||
23 | return response()->json(['status' => 'verification-link-sent']); |
||
24 | } |
||
26 |