| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace app\admin\model;
- use app\common\model\BaseModel;
- class Users extends BaseModel
- {
- /**
- * @var string
- */
- protected $name = 'system_users';
- /**
- * @var array
- */
- protected $auto = [];
- /**
- * @var array
- */
- protected $insert = ['created_at','updated_at'];
- /**
- * @var array
- */
- protected $update = ['updated_at'];
- /**
- * 密码修改器
- *
- * @author 许祖兴 < zuxing.xu@lettered.cn>
- * @date 2020/3/16 17:19
- *
- * @param string $value 原始值
- * @return string 加密后
- */
- public function setPasswordAttr($value)
- {
- return password_hash($value, PASSWORD_BCRYPT);
- }
- }
|