Commit 283d4301 authored by shajiaiming's avatar shajiaiming

fix

parent 15cd33ce
......@@ -34,7 +34,8 @@ class Notice extends BaseActiveRecord
[['title', 'content', 'type', 'status', 'platform_id', 'author'], 'required'],
[['status', 'type', 'platform_id', 'is_top'], 'integer'],
['is_top', 'verfiyIsTop'],
['type', 'verfiyType']
['type', 'verfiyType'],
[['is_top'], 'safe']
];
}
......@@ -70,8 +71,8 @@ class Notice extends BaseActiveRecord
public function scenarios()
{
$scenarios = [
self:: SCENARIOS_CREATE => ['title', 'content', 'author', 'status', 'type', 'platform_id'],
self:: SCENARIOS_UPDATE => ['id', 'title', 'content', 'author', 'status', 'type', 'platform_id'],
self:: SCENARIOS_CREATE => ['title', 'content', 'author', 'status', 'type', 'platform_id', 'is_top'],
self:: SCENARIOS_UPDATE => ['id', 'title', 'content', 'author', 'status', 'type', 'platform_id', 'is_top'],
];
return array_merge(parent:: scenarios(), $scenarios);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment