update upload ảnh nhân viên
This commit is contained in:
@@ -16,6 +16,7 @@ use Yii;
|
||||
* @property int $birthday
|
||||
* @property string $email
|
||||
* @property string $phone
|
||||
* @property string $image
|
||||
* @property int $date_in
|
||||
* @property string $address
|
||||
* @property int $created_at
|
||||
@@ -41,7 +42,7 @@ class Staff extends \yii\db\ActiveRecord {
|
||||
return [
|
||||
[['code', 'name', 'gender'], 'required'],
|
||||
[['code', 'card_number', 'department_id', 'birthday', 'date_in', 'created_at', 'modified_at', 'card_register_time', 'schedule_id'], 'integer'],
|
||||
[['address', 'door_access', 'door_access_old'], 'string'],
|
||||
[['address', 'door_access', 'door_access_old', 'image'], 'string'],
|
||||
[['name', 'email'], 'string', 'max' => 100],
|
||||
[['gender'], 'string', 'max' => 10],
|
||||
[['phone'], 'string', 'max' => 20],
|
||||
@@ -92,7 +93,8 @@ class Staff extends \yii\db\ActiveRecord {
|
||||
"address" => $data["Address"],
|
||||
"created_at" => time(),
|
||||
"modified_at" => time(),
|
||||
"card_register_time" => time()
|
||||
"card_register_time" => time(),
|
||||
"image" => $data['Image']
|
||||
], '');
|
||||
if ($r) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user