类别和子类别之间的关系如下: class Category extends Model use HasFactory;
'parent_idCategory::class);
return $this->hasMany(Category::class , 'parent_idpublic function index() $
当我编辑产品时,我也尝试编辑多个图像,所以如果我上传新的图像,旧的图像应该被新的图像所取代,但是现在如果我上传图像,我得到了一个错误的Property [filename] does not exist on this collection instance.",旧的图像没有被删除,但是新的图像已经被添加了。有一些产品和ProductsPhoto表是相关的,在ProductsPhoto表中有一个文件名列和product_id列。在编辑产品时,如何用新的图像替换旧的图像?叶片模板
<input multiple="multiple" name=