Laravel - 将 id 令牌从路由传递到闭包

Laravel - pass id token to closure from route

在 routes.php 中的路线封闭内,例如

Route::get('test/{id}', function()
{  
    // do stuff
});

是否可以在闭包内访问令牌 {id}?

{id} 将作为第一个参数传递给闭包:

Route::get('test/{id}', function($id)
{  
    echo $id;
});