标签:gets end 控制器 stat 输出 color ext get user
<?php
namespace app\model;
use think\Model;
class User1 extends Model
{
public function getStatusTextAttr($value,$data){
$status = [
‘1‘=>‘正常‘,
‘2‘=>‘待审核‘,
‘0‘=>‘删除‘
];
return $status[$data[‘status‘]];
}
}
控制器输出
dump($result[‘status_text‘]);
标签:gets end 控制器 stat 输出 color ext get user
原文地址:https://www.cnblogs.com/aln0825/p/12563467.html