我有这条路线
Route::name('recruitment.edit.profile')->get('/edit-profile/{id}', 'EmployeeController@showEditProfileForm');
有参数id
和
我的blade.php中的这段代码
<a href="{{ route('recruitment.edit.profile', $users->id) }}" class="btn btn-success">
<i class="fa fa-edit m-right-xs"></i> Edit Profile
</a>
但是当我点击指定的链接时,我收到了此网址http://mpci-vo.dev/recruitment/edit-profile?9
和一条消息Whoops, looks like something went wrong.
我的问题为什么?
之前有9
答案 0 :(得分:1)
更改route('recruitment.edit.profile', $users->id)
到
route('recruitment.edit.profile', ['id' => $users->id])