update config
This commit is contained in:
@@ -8,6 +8,7 @@ use Yii;
|
||||
* This is the model class for table "sync_url".
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $key_config
|
||||
* @property string $data
|
||||
*/
|
||||
class SyncUrl extends \yii\db\ActiveRecord {
|
||||
@@ -25,7 +26,7 @@ class SyncUrl extends \yii\db\ActiveRecord {
|
||||
public function rules() {
|
||||
return [
|
||||
[['data'], 'required'],
|
||||
[['data'], 'string'],
|
||||
[['data', 'key_config'], 'string'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -36,12 +37,14 @@ class SyncUrl extends \yii\db\ActiveRecord {
|
||||
return [
|
||||
'id' => 'ID',
|
||||
'data' => 'Data',
|
||||
'key_config' => 'Key Config'
|
||||
];
|
||||
}
|
||||
|
||||
public function create($data) {
|
||||
$r = $this->load([
|
||||
'data' => $data['url'],
|
||||
'key_config' => $data['key_config'],
|
||||
'data' => $data['data'],
|
||||
], '');
|
||||
if ($r) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user