buildadmin/app/common/model/User.php

19 lines
371 B
PHP

<?php
namespace app\common\model;
use think\Model;
use think\facade\Config;
class User extends Model
{
protected $autoWriteTimestamp = 'int';
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
public function getAvatarAttr($value)
{
return full_url($value, true, Config::get('buildadmin.default_avatar'));
}
}