Commit e51187fd by Евгений

Улучшение #20347

Синхронизация наборов минус фраз
1 parent 7758777e
......@@ -5,6 +5,7 @@ namespace App\Console\Commands;
use App\Models\Pivots\GoalNegativeKeywordSharedSet;
use App\Models\Tokens;
use App\Service\Requests\Direct\AddNegativeKeywordSharedSets;
use App\Service\Requests\Direct\UpdateNegativeKeywordSharedSets;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Relations\HasMany;
......@@ -64,7 +65,7 @@ class NegativeKeywordSharedSetsUpdate extends Command
]);
}
$request = new AddNegativeKeywordSharedSets();
$request = new UpdateNegativeKeywordSharedSets();
$request->setToken($token)
->call([
'goalNegativeKeywordSharedSets' => $goalNegativeKeywordSharedSets,
......
......@@ -226,7 +226,10 @@ class GoalAdGroup extends Pivot
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)
->withPivot(GoalAdGroupGoalNegativeKeywordSharedSet::getWithPivot())
->withTimestamps();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!