From e5196bbafebc3f0165e747f8814566e488b4e601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 22 Mar 2024 16:51:54 +0100 Subject: [PATCH] Fixes for default list --- .../2024_02_28_180250_add_steps_to_subscriptions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/database/migrations/2024_02_28_180250_add_steps_to_subscriptions.php b/database/migrations/2024_02_28_180250_add_steps_to_subscriptions.php index 031494233f57..04faa15f03f4 100644 --- a/database/migrations/2024_02_28_180250_add_steps_to_subscriptions.php +++ b/database/migrations/2024_02_28_180250_add_steps_to_subscriptions.php @@ -10,6 +10,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +use App\Livewire\BillingPortal\Purchase; +use App\Services\Subscription\StepService; use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -21,9 +23,9 @@ return new class extends Migration { $table->string('steps')->nullable(); }); - $steps = collect(\App\Livewire\BillingPortal\Purchase::$dependencies) - ->pluck('id') - ->implode(','); + $steps = collect(Purchase::defaultSteps()) + ->map(fn ($step) => StepService::mapClassNameToString($step)) + ->implode(','); \App\Models\Subscription::query() ->withTrashed()