update Device full CRUD

This commit is contained in:
2020-10-13 13:40:49 +07:00
parent 64e62ca3ce
commit 03e03c7e13
20 changed files with 1170 additions and 77 deletions

View File

@@ -183,4 +183,14 @@ class common extends \yii\db\ActiveRecord {
return $model->create($data);
}
public static function requestToCardService($path, $data) {
return file_get_contents("http://192.168.2.119:2001" . $path, false, stream_context_create([
'http' => [
'header' => "Content-Type: application/json",
'method' => "POST",
'content' => json_encode($data)
]
]));
}
}