1Route::middleware(['first', 'second'])->group(function () {
2 Route::get('/', function () {
3 // Uses first & second middleware...
4 });
5
6 Route::get('/user/profile', function () {
7 // Uses first & second middleware...
8 });
9});
1Route::group(['prefix' => 'admin'], function () {
2 Route::get('users', function () {
3 // Matches The "/admin/users" URL
4 });
5});
1Route::prefix('admin')->group(function () {
2 Route::get('/users', function () {
3 // Matches The "/admin/users" URL
4 });
5});