@ -112,4 +112,12 @@ class Category extends \yii\db\ActiveRecord
{
return $this->hasOne(File::className(), ['id' => 'icon']);
}
public function beforeSave($insert)
if (!$this->sort_order) {
$this->sort_order = "999";
return parent::beforeSave($insert); // TODO: Change the autogenerated stub