📜  laravel 中间件路由 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:41.545000             🧑  作者: Mango

代码示例1
Route::middleware([CheckAge::class])->group(function () {
    Route::get('/', function () {
        //
    });

    Route::get('admin/profile', function () {
        //
    })->withoutMiddleware([CheckAge::class]);
});