Created
July 1, 2021 00:35
-
-
Save NandoKstroNet/b659f2bb652e1288038f720ce8619586 to your computer and use it in GitHub Desktop.
Rotas para verificação de conta Laravel...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Foundation\Auth\EmailVerificationRequest; | |
use Illuminate\Http\Request; | |
Route::get('/email/verify', function () { | |
return view('auth.verify'); | |
})->middleware('auth')->name('verification.notice'); | |
Route::get('/email/verify/{id}/{hash}', function (EmailVerificationRequest $request) { | |
$request->fulfill(); | |
return redirect('/home'); | |
})->middleware(['auth', 'signed'])->name('verification.verify'); | |
Route::post('/email/verification-notification', function (Request $request) { | |
$request->user()->sendEmailVerificationNotification(); | |
return back()->with('message', 'Verification link sent!'); | |
})->middleware(['auth', 'throttle:6,1'])->name('verification.send'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment