|
|
|
@ -50,7 +50,10 @@ class UserFavController extends Controller |
|
|
|
{ |
|
|
|
$id = (int)request()->input('agent_product_id'); |
|
|
|
|
|
|
|
$fav = UserFav::query()->where(['user_id' => $this->user_id, 'agent_product_id' => $id])->first(); |
|
|
|
$fav = UserFav::query()->where([ |
|
|
|
'user_id' => $this->user_id, |
|
|
|
'agent_product_id' => $id, |
|
|
|
])->first(); |
|
|
|
if (!$fav) { |
|
|
|
return $this->error('收藏不存在'); |
|
|
|
} |
|
|
|
|