]> git.localhorst.tv Git - alttp.git/blob - app/Http/Controllers/Auth/EmailVerificationNotificationController.php
add discord auth
[alttp.git] / app / Http / Controllers / Auth / EmailVerificationNotificationController.php
1 <?php
2
3 namespace App\Http\Controllers\Auth;
4
5 use App\Http\Controllers\Controller;
6 use App\Providers\RouteServiceProvider;
7 use Illuminate\Http\Request;
8
9 class EmailVerificationNotificationController extends Controller
10 {
11     /**
12      * Send a new email verification notification.
13      *
14      * @param  \Illuminate\Http\Request  $request
15      * @return \Illuminate\Http\RedirectResponse
16      */
17     public function store(Request $request)
18     {
19         if ($request->user()->hasVerifiedEmail()) {
20             return redirect()->intended(RouteServiceProvider::HOME);
21         }
22
23         $request->user()->sendEmailVerificationNotification();
24
25         return back()->with('status', 'verification-link-sent');
26     }
27 }