change key staffArray from code to id

This commit is contained in:
2022-04-02 10:17:17 +07:00
parent 7d83a98e21
commit e26819f1fb
2 changed files with 2 additions and 2 deletions

View File

@@ -122,7 +122,7 @@ class ListManagement extends \yii\db\ActiveRecord {
$res = [];
$ls = self::find()->all();
foreach ($ls as $key => $value) {
$res[$value->code] = $value->code . " - " . $value->name;
$res[$value->id] = $value->code . " - " . $value->name;
}
return $res;
}