How to use route level middleware 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');