Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
EmailVerificationNotificationController
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 1
 store
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2
3namespace App\Http\Controllers\Auth;
4
5use App\Http\Controllers\Controller;
6use Illuminate\Http\RedirectResponse;
7use Illuminate\Http\Request;
8
9class 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}