update Device full CRUD
This commit is contained in:
@@ -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)
|
||||
]
|
||||
]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user