search

Home  >  Q&A  >  body text

There is still a bug in this place. It is not a problem with empty data submission.

There are still bugs in this place. The problem is not when submitting empty data.

$param = $request->param();

$pwd = (UserModel::get([ 'id'=>$param['id']]))['password'];


//Remove empty data

foreach ( $param as $k=>$v)

                                                                                                                                                                     k]=$v;

                                                                                                                                                             

                                                                                                                                                                                  $param = $request->except('password');

$result = UserModel::update($param,$condition);

电动小老虎电动小老虎2701 days ago1432

reply all(1)I'll reply

  • 电动小老虎

    电动小老虎2017-12-21 19:11:19

    This is correct

    reply
    0
  • Cancelreply