获取路由中的指定参数?

时间:2019-02-14 10:28:13

标签: laravel routes slug

我有一条包含多个参数的路线。我如何在下面的路线中到达slug

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

1 个答案:

答案 0 :(得分:2)

您可以直接获取它,documentation供参考:

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

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

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