cập nhật tính năng quản trị phòng ban
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user