@php $selectedService = old('service_type', $item->service_type ?: 'food'); $isInstaKart = $selectedService === 'grocery'; $variantsText = collect(old('variants', $item->variants ?? []))->map(fn ($row) => ($row['name'] ?? '') . ' | ' . ($row['price'] ?? 0))->implode("\n"); $addonsText = collect(old('add_ons', $item->add_ons ?? []))->map(fn ($row) => ($row['name'] ?? '') . ' | ' . ($row['price'] ?? 0))->implode("\n"); $selectedGlobalCategoryId = old('global_category_id'); $selectedGlobalSubcategoryId = old('global_subcategory_id'); $categoryOptions = ($globalCategories ?? collect())->mapWithKeys(function ($category) { return [ $category->id => [ 'name' => $category->name, 'service_type' => $category->service_type, 'children' => $category->children->map(fn ($child) => [ 'id' => $child->id, 'name' => $child->name, ])->values(), ], ]; }); @endphp
@csrf @if($method !== 'POST') @method($method) @endif
@error('name')
{{ $message }}
@enderror
Visible for InstaKart items only.
is_active ?? true) ? 'checked' : '' }}>
Cancel
@section('scripts') @parent @endsection