Commit 528483e9 by Vladislav

fix

1 parent 5e2f8c4b
......@@ -50,6 +50,10 @@ class DictionaryCampaignsSyncByCampaign extends Command
$goalAdGroup = GoalAdGroup::updateOrCreateByMain($adGroup, $dictionaryCampaign);
if ($goalAdGroup->wasRecentlyCreated) {
dd($goalAdGroup, $goalAdGroup->id);
}
$adGroup->keywords->each(function (Keyword $keyword) use ($goalAdGroup, $dictionaryCampaign) {
GoalKeyword::updateOrCreateByMain($keyword, $goalAdGroup, $dictionaryCampaign);
});
......
......@@ -124,6 +124,8 @@ class DictionaryCampaign extends Pivot
'synced_need' => 'datetime',
];
public $incrementing = true;
static public function getWithPivot()
{
return [
......
......@@ -42,6 +42,8 @@ class DictionaryCampaignVariable extends Pivot
protected $casts = [
];
public $incrementing = true;
static public function getWithPivot()
{
return [
......
......@@ -80,6 +80,8 @@ class GoalAdGroup extends Pivot
'updated_self' => 'datetime',
];
public $incrementing = true;
static public function getWithPivot()
{
return [
......
......@@ -69,6 +69,8 @@ class GoalKeyword extends Pivot
'updated_need' => 'datetime',
];
public $incrementing = true;
static public function getWithPivot()
{
return [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!