Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
$ret = Db::table('mhh_user u')->join('mhh_order o','u.uid = o.uid')->select();
print_r($ret);
use app\model\User;
$ret = User::where('uid',10)->find();
print_r($set['nickname']);
// 获取器格式:get + 字段 + Attr 创建一个方法名
public function getStatusAttr($v){
$arr = [
0=>'禁用',
1=>'启用',
2=>'待审核'
];
return $arr[$v];
return ['0'=>'禁用','1'=>'启用',];
}
// 修改器格式:set + 字段 + Attr 创建一个方法名
public function setPasswordAttr($v,$all){
return md($v);
}
`