“Laravel Verifikasi Email Tutorial Laravel 8” Kode Jawaban

Verifikasi Email Laravel

Route::name('auth.resend_confirmation')->get('/register/confirm/resend', 'Auth\RegisterController@resendConfirmation');

Route::name('auth.confirm')->get('/register/confirm/{confirmation_code}', 'Auth\RegisterController@confirm');
Amused Ape

Laravel Verifikasi Email Tutorial Laravel 8

<?php
  
namespace App\Http\Middleware;
  
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
  
class IsVerifyEmail
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle(Request $request, Closure $next)
    {
        if (!Auth::user()->is_email_verified) {
            auth()->logout();
            return redirect()->route('login')
                    ->with('message', 'You need to confirm your account. We have sent you an activation code, please check your email.');
          }
   
        return $next($request);
    }
}
Muhammad Haseeb

Jawaban yang mirip dengan “Laravel Verifikasi Email Tutorial Laravel 8”

Pertanyaan yang mirip dengan “Laravel Verifikasi Email Tutorial Laravel 8”

Lebih banyak jawaban terkait untuk “Laravel Verifikasi Email Tutorial Laravel 8” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya