Skip to content

Instantly share code, notes, and snippets.

@NandoKstroNet
Created July 1, 2021 00:35
Show Gist options
  • Save NandoKstroNet/b659f2bb652e1288038f720ce8619586 to your computer and use it in GitHub Desktop.
Save NandoKstroNet/b659f2bb652e1288038f720ce8619586 to your computer and use it in GitHub Desktop.
Rotas para verificação de conta Laravel...
<?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