cập nhật tính năng quản trị phòng ban

This commit is contained in:
2020-10-07 17:29:30 +07:00
parent 586be80cf6
commit 2d15fc1c14
22 changed files with 1041 additions and 72 deletions

View File

@@ -201,4 +201,13 @@ class User extends ActiveRecord implements \yii\web\IdentityInterface {
return $this->user_image == null ? $directoryAsset . "/img/user2-160x160.jpg" : Yii::getAlias("@images_folder") . $this->user_image;
}
public static function userArray() {
$lists = self::find()->all();
$results = [];
foreach ($lists as $key => $value) {
$results[$value->id] = $value->first_name;
}
return $results;
}
}