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 e51187fd
authored
Jul 19, 2021
by
Евгений
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Улучшение #20347
Синхронизация наборов минус фраз
1 parent
7758777e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
app/Console/Commands/NegativeKeywordSharedSetsUpdate.php
app/Models/Pivots/GoalAdGroup.php
app/Console/Commands/NegativeKeywordSharedSetsUpdate.php
View file @
e51187f
...
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
...
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
use
App\Models\Pivots\GoalNegativeKeywordSharedSet
;
use
App\Models\Pivots\GoalNegativeKeywordSharedSet
;
use
App\Models\Tokens
;
use
App\Models\Tokens
;
use
App\Service\Requests\Direct\AddNegativeKeywordSharedSets
;
use
App\Service\Requests\Direct\AddNegativeKeywordSharedSets
;
use
App\Service\Requests\Direct\UpdateNegativeKeywordSharedSets
;
use
Carbon\Carbon
;
use
Carbon\Carbon
;
use
Illuminate\Console\Command
;
use
Illuminate\Console\Command
;
use
Illuminate\Database\Eloquent\Relations\HasMany
;
use
Illuminate\Database\Eloquent\Relations\HasMany
;
...
@@ -64,7 +65,7 @@ class NegativeKeywordSharedSetsUpdate extends Command
...
@@ -64,7 +65,7 @@ class NegativeKeywordSharedSetsUpdate extends Command
]);
]);
}
}
$request
=
new
Add
NegativeKeywordSharedSets
();
$request
=
new
Update
NegativeKeywordSharedSets
();
$request
->
setToken
(
$token
)
$request
->
setToken
(
$token
)
->
call
([
->
call
([
'goalNegativeKeywordSharedSets'
=>
$goalNegativeKeywordSharedSets
,
'goalNegativeKeywordSharedSets'
=>
$goalNegativeKeywordSharedSets
,
...
...
app/Models/Pivots/GoalAdGroup.php
View file @
e51187f
...
@@ -226,7 +226,10 @@ class GoalAdGroup extends Pivot
...
@@ -226,7 +226,10 @@ class GoalAdGroup extends Pivot
public
function
goalNegativeKeywordSharedSets
()
public
function
goalNegativeKeywordSharedSets
()
{
{
return
$this
->
belongsToMany
(
GoalNegativeKeywordSharedSet
::
class
,
GoalAdGroupGoalNegativeKeywordSharedSet
::
getModel
()
->
getTable
(),
'goal_ad_group_id'
,
'goal_negative_keyword_shared_set_id'
)
return
$this
->
belongsToMany
(
GoalNegativeKeywordSharedSet
::
class
,
GoalAdGroupGoalNegativeKeywordSharedSet
::
getModel
()
->
getTable
(),
'goal_ad_group_id'
,
'goal_negative_keyword_shared_set_id'
)
->
using
(
GoalAdGroupGoalNegativeKeywordSharedSet
::
class
)
->
using
(
GoalAdGroupGoalNegativeKeywordSharedSet
::
class
)
->
withPivot
(
GoalAdGroupGoalNegativeKeywordSharedSet
::
getWithPivot
())
->
withPivot
(
GoalAdGroupGoalNegativeKeywordSharedSet
::
getWithPivot
())
->
withTimestamps
();
->
withTimestamps
();
...
...
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