|
|
@@ -10,7 +10,7 @@ class SupervisorsModel extends BaseModel
|
|
|
// 设置数据表
|
|
|
protected $table = 'supervisors';
|
|
|
|
|
|
- protected $appends = ['type_name'];
|
|
|
+ protected $appends = ['type_name','mobile_text'];
|
|
|
|
|
|
// 头像
|
|
|
public function getAvatarAttribute($value)
|
|
|
@@ -18,6 +18,14 @@ class SupervisorsModel extends BaseModel
|
|
|
$value = $value ? get_image_url($value) : '';
|
|
|
return $value;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function getmobileTextAttribute()
|
|
|
+ {
|
|
|
+ return $this->mobile? format_mobile($this->mobile):'';
|
|
|
+ }
|
|
|
|
|
|
// 类型
|
|
|
public function getTypeNameAttribute($value)
|