From 995c09da6d42b8d11e68591ac09f7d475cc7131c Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Thu, 26 Sep 2024 08:04:52 +0100 Subject: [PATCH] Refactor globals export (#358) --- src/Commands/ExportGlobals.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Commands/ExportGlobals.php b/src/Commands/ExportGlobals.php index 4c4f4566..4dd9be28 100644 --- a/src/Commands/ExportGlobals.php +++ b/src/Commands/ExportGlobals.php @@ -73,15 +73,15 @@ private function exportGlobals() $this->withProgressBar($sets, function ($model) use ($variables) { $global = GlobalSetFacade::make() ->handle($model->handle) - ->title($model->title) - ->save(); + ->title($model->title); foreach ($variables->where('handle', $model->handle) as $localization) { $global->makeLocalization($localization->locale) ->data($localization->data) - ->origin($localization->origin ?? null) - ->save(); + ->origin($localization->origin ?? null); } + + $global->save(); }); $this->newLine();