Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 528483e9
authored
Jun 16, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
1 parent
5e2f8c4b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
0 deletions
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
app/Models/Pivots/DictionaryCampaign.php
app/Models/Pivots/DictionaryCampaignVariable.php
app/Models/Pivots/GoalAdGroup.php
app/Models/Pivots/GoalKeyword.php
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
View file @
528483e
...
@@ -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
);
});
});
...
...
app/Models/Pivots/DictionaryCampaign.php
View file @
528483e
...
@@ -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
[
...
...
app/Models/Pivots/DictionaryCampaignVariable.php
View file @
528483e
...
@@ -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
[
...
...
app/Models/Pivots/GoalAdGroup.php
View file @
528483e
...
@@ -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
[
...
...
app/Models/Pivots/GoalKeyword.php
View file @
528483e
...
@@ -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
[
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment