Replace pivot->delete
Closed this issue · 0 comments
ddurieux commented
replace delete pivot with detach
$pivot = \App\v1\Models\ItemProperty::find($idPivot);
$pivot->delete();
by
$item->properties()
->wherePivot('value_itemlink', $args['itemlinkid'])
->detach($args['propertyid']);