【发布时间】:2020-02-03 08:41:23
【问题描述】:
我想在一些操作后重定向用户以使用参数进行路由,我写了这样的东西
return redirect()-route('purchaseList' , ['shop' => $shopName , 'id' => $productId]);
但是当它重定向它给我这个错误:
Illuminate\Routing\Redirector 类的对象无法转换为 int
btw $shopName 和 $productID 是存在的,问题不是这个
这是我的路线
Route::get('/{shop}/purchase-list/{id}', 'ShopController@purchaseList')->name('purchaseList');
【问题讨论】: