get(); foreach($storeIds as $key =>$value){ $model = new GoodsModel(); $model = $goods; dd($model->toArray()); $model->store_id = $value; $model->name = $goods->name; } return $this->success('修改成功', '/goods'); } /** * Build a form here. */ public function form() { $id = $this->getKey(); $this->text('goods_id')->value($id); $stores = StoreModel::getStoreArray(); $this->multipleSelect('store_ids','选择店铺')->required()->options($stores); } /** * The data of the form. * * @return array */ public function default() { return []; } }