@extends('layouts.app') @section('content') @php $planRows = old( 'plans', $product->allPlans ->where('is_active', true) ->sortBy('sort_order') ->values() ->map(fn ($plan) => [ 'id' => $plan->id, 'name' => $plan->name, 'description' => $plan->description, 'tier' => $plan->tier, 'price_usd' => number_format($plan->price_usd, 2, '.', ''), 'seat_price_usd' => number_format($plan->seat_price_cents / 100, 2, '.', ''), 'price_sats' => $plan->price_sats, 'billing_period' => $plan->billing_period, 'stripe_price_id' => $plan->stripe_price_id, 'is_active' => $plan->is_active, ]) ->all() ); if ($planRows === []) { $planRows = [[ 'name' => 'Standard', 'description' => '', 'tier' => 'standard', 'price_usd' => '', 'seat_price_usd' => '', 'price_sats' => '', 'billing_period' => 'monthly', 'stripe_price_id' => '', 'is_active' => true, ]]; } @endphp

Edit Product

@csrf @method('PUT')
is_active)>
requires_license_key))>
is_tiered))>
@if ($errors->has('plans'))
{{ $errors->first('plans') }}
@endif

Pricing Options

@foreach ($planRows as $index => $plan) @include('admin.product._plan_fields', [ 'index' => $index, 'plan' => $plan, 'heading' => old('is_tiered', $product->is_tiered) ? 'Tier ' . ($index + 1) : 'Price', ]) @endforeach
@endsection @section('script') @endsection