upload image

This commit is contained in:
2020-12-04 11:07:12 +07:00
parent 4187fc7239
commit df39cdf602
10 changed files with 60 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ use Yii;
* This is the model class for table "capture_logs".
*
* @property int $id
* @property int $staff_id
* @property int $time
* @property string $image
* @property int $status
@@ -27,7 +28,7 @@ class CaptureLogs extends \yii\db\ActiveRecord {
*/
public function rules() {
return [
[['time', 'status'], 'integer'],
[['staff_id', 'time', 'status'], 'integer'],
[['image', 'remark'], 'string'],
];
}
@@ -47,6 +48,7 @@ class CaptureLogs extends \yii\db\ActiveRecord {
public function create($data) {
$r = $this->load([
'staff_id' => $data['Staff'],
'time' => $data['Time'],
'image' => $data["Image"],
'status' => 0,