【发布时间】:2016-09-27 12:20:28
【问题描述】:
我需要通过单击按钮将附加参数 ($uid) 从我的 index.blade.php 传递到我的 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);
}
使用上面的代码,我得到一个错误:“App\Http\Controllers\FlyersController::edit() 缺少参数 2”
我在这里做错了什么?
【问题讨论】:
-
你为什么不链接路线呢?