add middleware to route.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');