public function trans($id, $param = []) { $customer = Doing::findOne($id); $res = Doing::getDb()->transaction(function ($db) use($customer, $param) { $customer->email = $param['email']; $customer->save(); return $customer; }); return $res; }
public function actionTestDoing() { $doing = Doing::findOne(2); return $this->render('test-doing', ['doing' => $doing]); }