会员级别添加关联权益及图片
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user