diff --git a/app/Http/Controllers/SubscriptionStepsController.php b/app/Http/Controllers/SubscriptionStepsController.php new file mode 100644 index 000000000000..757ef993dab2 --- /dev/null +++ b/app/Http/Controllers/SubscriptionStepsController.php @@ -0,0 +1,25 @@ +map(fn($dependency) => [ + 'id' => $dependency['id'], + 'dependencies' => collect($dependency['dependencies']) + ->map(fn($dependency) => Purchase::$dependencies[$dependency]['id']) + ->toArray(), + ]) + ->toArray(); + + return response()->json($dependencies); + } +}