where('mobile',$phone)->find(); if ($query) $this->where('mobile',$phone)->delete(); $this->save([ 'mobile' => $phone, 'code' => $code, 'time' => time() ]); return ['status' => true]; } }