Plan::query()->orderBy('sort')->get()->map(fn (Plan $plan) => [ 'key' => $plan->key, 'name' => $plan->name, // In ringgit. 'price' => $plan->price / 100, 'stores' => $plan->stores, 'regenerations' => $plan->regenerations, 'edits' => $plan->edits, 'period' => $plan->period, ]), 'trialDays' => (int) config('plans.trial_days'), // Stores live at ".", so the hero can show a shop's future address. 'storeDomain' => config('storefront.domain'), ]); } }