在路由中获取指定参数?

get a specified parameter in a route?

我有一条包含多个参数的路线。我怎样才能在下面的路线中获得 slug

Route::apiResource('/tournaments/{tournament}/structures/{slug}', '\SingleController');

可以直接获取,documentation供大家参考:

public function index($tournament, $slug) {}

public function show($tournament, $slug, $id) {}

public function store($tournament, $slug) {}