update BaseOptions
This commit is contained in:
parent
e105bef460
commit
bcfb184618
@ -61,6 +61,8 @@ class Category extends BaseModel
|
||||
'deleted_at',
|
||||
);
|
||||
|
||||
protected $updateChildrenFields = 'status';
|
||||
|
||||
const LIST_TYPE = 1; // 列表
|
||||
const PAGE_TYPE = 2; // 单页
|
||||
const COVER_TYPE = 3; // 封面
|
||||
|
@ -184,7 +184,7 @@ trait BaseOptionsTrait
|
||||
if (!empty($this->updateChildrenFields)) {
|
||||
if (is_array($this->updateChildrenFields)) {
|
||||
foreach ($data as $field => $value) {
|
||||
if (in_array($field, $this->updateChildrenFields)) {
|
||||
if (! in_array($field, $this->updateChildrenFields)) {
|
||||
unset($data[$field]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user