UserShare

This commit is contained in:
2024-11-30 16:42:04 +08:00
parent 08683c7fa0
commit a2cb1a01fa
3 changed files with 7 additions and 2 deletions

View File

@ -11,6 +11,11 @@ class TicketUserShare extends Model
return str2arr($data['imgs'] ?: '', '|');
}
public function type()
{
return $this->belongsTo(TicketType::class, 'type_id', 'id');
}
public function getTypeNameAttr($value, $data)
{
$type = $this->type()->find();