CodeModel.php
389 字节
<?php
/**
* Created by PhpStorm.
* User: 29925
* Date: 2018/9/10
* Time: 11:36
*/
namespace app\user\model;
use think\Model;
class CodeModel extends Model
{
protected $autoWriteTimestamp = true;
/**
* 添加验证码
*/
public function addCode($data) {
$this->allowField(true)->data($data,true)->isUpdate(false)->save();
return $this;
}
}