title: How to create Laravel Fortify 2FA as a middleware?
body: <p>I am new to Laravel and using version 8. I have installed Fortify and uses Laravel UI as the front-end login. I have enabled Fortify 2FA but it only requested upon login, how do I convert Fortify 2FA as a middleware to use it in other web routes? Any help would be highly appreciated, thank you!</p>
  <p>Example to protect a web route using Foritfy 2FA in web.php<br>
  <code>Route::get('/example', [ExampleController, 'index'])-&gt;middleware('Fortify 2FA')-&gt;name('example.index');</code></p>