@props([]) {{-- | The package editor's fields — one definition, two hosts. | | The standalone page (packages/form.blade.php) and the modal on the index both | render this, so a field can never exist on one and not the other. Both hosts | provide an Alpine `form` object with the same shape, and every input carries | BOTH a server-rendered value and an x-model: the value is what a browser with | no JavaScript submits, the x-model is what the modal binds to. | | Requires in scope: $package (a LicensePackage, possibly unsaved). --}} @php $billingPeriods = [ 'monthly' => ['Monthly', 'Billed every month'], 'quarterly' => ['Quarterly', 'Billed every three months'], 'semiannual' => ['Semiannual', 'Billed twice a year'], 'annual' => ['Annual', 'Billed once a year'], 'custom' => ['Custom', 'Priced per agreement'], ]; $old = fn (string $field, $fallback = null) => old($field, $package->$field ?? $fallback); @endphp
{{ $package->slug ?: '—' }}
{{ $message }}
@enderror @error('slug'){{ $message }}
@enderrorBlank means the owner sets the term on each license.
@error('duration_days'){{ $message }}
@enderrorWorks out at Rs per day. Set a duration to see the daily rate.
@error('price'){{ $message }}
@enderror{{ $message }}
@enderrorLower numbers appear first, here and on the license form.
@error('sort_order'){{ $message }}
@enderror