在路由中获取指定的参数?

问题描述 投票:0回答:1

我有一个多参数的路线。我怎么能在下面的路线上获得slug

Route::apiResource('/tournaments/{tournament}/structures/{slug}', '\SingleController');
laravel routes slug
1个回答
2
投票

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

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

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

public function store($tournament, $slug) {}
© www.soinside.com 2019 - 2024. All rights reserved.