<?php namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; class EnsureMfa {public function handle(Request $request,Closure $next){$u=$request->user(); if($u&&$u->mfa_enabled&&!session('mfa_verified')) return redirect()->route('mfa.challenge'); return $next($request);}}