|
0
|
1 <?php
|
|
|
2
|
|
|
3 namespace App\Http\Controllers\Auth;
|
|
|
4
|
|
|
5 use App\Http\Controllers\Controller;
|
|
|
6 use Illuminate\Http\RedirectResponse;
|
|
|
7 use Illuminate\Http\Request;
|
|
|
8
|
|
|
9 class EmailVerificationNotificationController extends Controller
|
|
|
10 {
|
|
|
11 /**
|
|
|
12 * Send a new email verification notification.
|
|
|
13 */
|
|
|
14 public function store(Request $request): RedirectResponse
|
|
|
15 {
|
|
|
16 if ($request->user()->hasVerifiedEmail()) {
|
|
|
17 return redirect()->intended(route('dashboard', absolute: false));
|
|
|
18 }
|
|
|
19
|
|
|
20 $request->user()->sendEmailVerificationNotification();
|
|
|
21
|
|
|
22 return back()->with('status', 'verification-link-sent');
|
|
|
23 }
|
|
|
24 }
|