update upload ảnh nhân viên
This commit is contained in:
@@ -111,6 +111,7 @@ class StaffController extends Controller {
|
||||
$model->phone = $data["Phone"];
|
||||
$model->date_in = date_format(date_create_from_format('d/m/Y', $data["DateIn"]), 'U');
|
||||
$model->address = $data["Address"];
|
||||
$model->image = $data["Image"];
|
||||
$model->modified_at = time();
|
||||
if ($model->save()) {
|
||||
common::insertSystemLogs(["action" => "update", "description" => "Chỉnh sửa nhân viên: " . $data["Name"], "type" => Yii::$app->controller->id]);
|
||||
@@ -294,4 +295,11 @@ class StaffController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function actionImage() {
|
||||
if (Yii::$app->request->post()) {
|
||||
$model = new common();
|
||||
return $model->UploadFile("AnhNhanVien", ["PNG", "JPG", "JPEG", "GIF"], "staff");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user