Mercurial > borealpoint
diff app/Http/Controllers/Auth/EmailVerificationNotificationController.php @ 0:9d7dcd54c677
Initial Commit and package setup
| author | luka |
|---|---|
| date | Sat, 23 Aug 2025 22:20:51 -0400 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/Http/Controllers/Auth/EmailVerificationNotificationController.php Sat Aug 23 22:20:51 2025 -0400 @@ -0,0 +1,24 @@ +<?php + +namespace App\Http\Controllers\Auth; + +use App\Http\Controllers\Controller; +use Illuminate\Http\RedirectResponse; +use Illuminate\Http\Request; + +class EmailVerificationNotificationController extends Controller +{ + /** + * Send a new email verification notification. + */ + public function store(Request $request): RedirectResponse + { + if ($request->user()->hasVerifiedEmail()) { + return redirect()->intended(route('dashboard', absolute: false)); + } + + $request->user()->sendEmailVerificationNotification(); + + return back()->with('status', 'verification-link-sent'); + } +}
