1
当我尝试更新db中的记录时,它不更新,并且它 returns false
。Laravel 5更新记录返回false
我不能图像索引了解为图像位置传递
$product->images()->update();
我不能使用ids
作为搜索条件,我必须update
。
<?php
if (isset($product->images[$key])) {
$result = $product->images[$key]->update([
'name' => $filename
]);
dd($result);
} else {
$product->images()->create([
'name' => $filename
]);
}
?>
你瞎了???我在帖子中说,我不能使用ID –
请检查我的更新回答 – aceraven777
其他块的作品,但如果块不 –