Commit 528483e9 by Vladislav

fix

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