Yii框架直接接收数组入库
public function actionAddPetAncestry(){ $model = new PetAncestry(); $arr = Yii::$app->request->post(); $model->setAttributes($arr); if($model->save()){ return Helper::format_data(SUCC,null); }else{ return Helper::format_data(PARAM_ERROR,null); } }
通往牛逼的路上,在意的只有远方!