middleware to a route code example
Example: how to attach the middleware to a route definition
Route::get('profile', function () {
// Only verified users may enter...
})->middleware('verified');
Route::get('profile', function () {
// Only verified users may enter...
})->middleware('verified');