How to redirect on register page if otp verified otherwise redirect to login Laravel?
问题 I am using Laravel 8 and Firebase to verify mobile with OTP. Now I want that if OTP verified then i can access register page if OTP is not verified then redirect to login page. Now I am using default Laravel registration form and when OTP verified i stored in cookie. I have created middleware but its not work if cookie not set then also i access registration but i want it not accessable. Middle-ware code is, public function handle(Request $request, Closure $next) { if (Cookie::get(