我有一个多参数的路线。我怎么能在下面的路线上获得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) {}