会员级别添加关联权益及图片

This commit is contained in:
2026-04-24 17:47:36 +08:00
parent 507894c8b4
commit 0471c0d2d9
5 changed files with 43 additions and 30 deletions

View File

@@ -53,4 +53,13 @@ class MemberBenefits extends Model
$list = $this->getDisabledList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSimpleByStatus($disabled = 0)
{
return Self::field(['id', 'title'])->where(function($query) use ($disabled) {
if (null !== $disabled) {
$query->where('disabled', '=', $disabled);
}
})->order('sort', 'asc')->select();
}
}