- Добавлен вызов метода производящего рассылку записей по кейсам

parent b7550d92
...@@ -193,4 +193,15 @@ class CoContent extends \common\components\ActiveRecordModel ...@@ -193,4 +193,15 @@ class CoContent extends \common\components\ActiveRecordModel
{ {
return $this->hasMany(CoContentLang::className(), ['content_id' => 'id']); return $this->hasMany(CoContentLang::className(), ['content_id' => 'id']);
} }
public function afterSave($insert, $changedAttributes)
{
parent::afterSave($insert, $changedAttributes);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, Yii::$app->urlManager->createAbsoluteUrl('/triggers/default/recheckcases'));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if (!curl_exec($curl)) {
echo curl_error($curl);
}
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment