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
其他塊的作品,但如果塊不 –