我需要通过点击按钮从我的index.blade.php传递一个额外的参数($uid)到我的edit.blade.php。
我的index.blade.php:
<a href="{!!action('FlyersController@edit', ['id' => Auth::user()->id, 'uid' => 1])!!}" type="button" class="btn btn-block btn-lg btn-info vorlageBtn card-link">Edit </a>
我的FlyersController:
public function edit($id, $uid)
{
return view('backend.flyers.edit')->withUid($uid);
}
使用上述代码时,我遇到了一个错误:"缺少参数2,用于App\Http\Controllers\FlyersController::edit()"。请问我做错了什么?