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 50e3a42a
authored
Oct 15, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#21104 Перенос проекта в продакшн
1 parent
6c9572b9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
app/Http/Controllers/CampaignVariablesController.php
app/Models/NegativeKeywordSharedSet.php
app/Models/Pivots/DictionaryCampaign.php
app/Http/Controllers/CampaignVariablesController.php
View file @
50e3a42
...
...
@@ -2,7 +2,9 @@
namespace
App\Http\Controllers
;
use
App\Models\NegativeKeywordSharedSet
;
use
App\Models\Pivots\DictionaryCampaign
;
use
App\Models\Pivots\GoalRetargetinglist
;
use
App\Models\Tokens
;
use
App\Models\Variable
;
use
Carbon\Carbon
;
...
...
@@ -197,8 +199,25 @@ class CampaignVariablesController extends Controller
$dictionary_campaign
->
update
([
'updated_need'
=>
Carbon
::
now
(),
]);
$dictionary_campaign
->
groups
()
->
update
([
$dictionary_campaign
->
groups
()
->
forExternal
()
->
update
([
'updated_need'
=>
Carbon
::
now
(),
]);
$dictionary_campaign
->
goalAdvertisements
()
->
forExternal
()
->
update
([
'updated_need'
=>
Carbon
::
now
(),
]);
$dictionary_campaign
->
goalKeywords
()
->
forExternal
()
->
update
([
'updated_need'
=>
Carbon
::
now
(),
]);
$dictionary_campaign
->
goalGoalSitelink
()
->
forExternal
()
->
update
([
'updated_need'
=>
Carbon
::
now
(),
]);
$dictionary_campaign
->
goalVCards
()
->
forExternal
()
->
update
([
'updated_need'
=>
Carbon
::
now
(),
]);
GoalRetargetinglist
::
forExternal
()
->
update
([
'updated_need'
=>
Carbon
::
now
(),
]);
NegativeKeywordSharedSet
::
forExternal
()
->
update
([
'updated_need'
=>
Carbon
::
now
(),
]);
}
...
...
app/Models/NegativeKeywordSharedSet.php
View file @
50e3a42
...
...
@@ -3,6 +3,7 @@
namespace
App\Models
;
use
App\Models\Pivots\GoalNegativeKeywordSharedSet
;
use
Illuminate\Database\Eloquent\Builder
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Support\Collection
;
...
...
@@ -36,6 +37,15 @@ class NegativeKeywordSharedSet extends Model
]);
}
/**
* @param Builder $query
* @return Builder
*/
public
function
scopeForExternal
(
$query
)
{
return
$query
->
whereNotNull
(
'external_id'
);
}
public
function
goalNegativeKeywordSharedSets
()
{
return
$this
->
hasMany
(
GoalNegativeKeywordSharedSet
::
class
,
'negative_keyword_shared_set_id'
);
...
...
app/Models/Pivots/DictionaryCampaign.php
View file @
50e3a42
...
...
@@ -493,6 +493,11 @@ class DictionaryCampaign extends Pivot
return
$this
->
hasMany
(
GoalAdvertisement
::
class
,
'dictionary_campaign_id'
);
}
public
function
goalGoalSitelink
()
{
return
$this
->
hasManyThrough
(
GoalSitelink
::
class
,
GoalAdvertisement
::
class
,
'dictionary_campaign_id'
,
'goal_sitelink_id'
);
}
public
function
goalAdvertisementsForNotExternalForNotReserveCreate
()
{
return
$this
->
goalAdvertisements
()
->
forNotExternal
()
->
forNotReserveCreate
();
...
...
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