Output:
Chunk ID: d0698a
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 10202
Output:
Total output lines: 316

resources/views/livewire/storefront/home.blade.php:20:                @foreach ($featuredProducts->take(4) as $product)
resources/views/livewire/storefront/home.blade.php:39:            @foreach ($featuredCollections as $collection)
resources/views/livewire/storefront/home.blade.php:60:            @foreach ($featuredProducts as $product)
resources/views/livewire/storefront/cart-drawer.blade.php:37:                                        {{ $line->variant->optionValues->map(fn ($value) => $value->option->name.': '.$value->value)->implode(' / ') ?: ($line->variant->sku ?: 'Default') }}
resources/views/livewire/storefront/checkout/show.blade.php:69:                            <flux:select.option value="DE">Germany</flux:select.option>
resources/views/livewire/storefront/checkout/show.blade.php:70:                            <flux:select.option value="AT">Austria</flux:select.option>
resources/views/livewire/storefront/checkout/show.blade.php:71:                            <flux:select.option value="CH">Switzerland</flux:select.option>
resources/views/livewire/storefront/checkout/show.blade.php:161:                                <flux:select.option value="credit_card">Credit card</flux:select.option>
resources/views/livewire/storefront/checkout/show.blade.php:162:                                <flux:select.option value="paypal">PayPal</flux:select.option>
resources/views/livewire/storefront/checkout/show.blade.php:163:                                <flux:select.option value="bank_transfer">Bank transfer</flux:select.option>
resources/views/livewire/storefront/collections/show.blade.php:57:                    <flux:select.option value="featured">Featured</flux:select.option>
resources/views/livewire/storefront/collections/show.blade.php:58:                    <flux:select.option value="price_asc">Price: Low to High</flux:select.option>
resources/views/livewire/storefront/collections/show.blade.php:59:                    <flux:select.option value="price_desc">Price: High to Low</flux:select.option>
resources/views/livewire/storefront/collections/show.blade.php:60:                    <flux:select.option value="newest">Newest</flux:select.option>
resources/views/livewire/storefront/search/index.blade.php:59:                    <flux:select.option value="relevance">Relevance</flux:select.option>
resources/views/livewire/storefront/search/index.blade.php:60:                    <flux:select.option value="price_asc">Price: Low to High</flux:select.option>
resources/views/livewire/storefront/search/index.blade.php:61:                    <flux:select.option value="price_desc">Price: High to Low</flux:select.option>
resources/views/livewire/storefront/search/index.blade.php:62:                    <flux:select.option value="newest">Newest</flux:select.option>
resources/views/livewire/storefront/products/show.blade.php:32:            @if ($product->options->isNotEmpty())
resources/views/livewire/storefront/products/show.blade.php:34:                    @foreach ($product->options as $option)
resources/views/livewire/storefront/products/show.blade.php:35:                        <fieldset class="space-y-3" wire:key="product-option-selector-{{ $option->getKey() }}">
resources/views/livewire/storefront/products/show.blade.php:36:                            <legend class="text-sm font-medium text-zinc-950 dark:text-white">{{ $option->name }}</legend>
resources/views/livewire/storefront/products/show.blade.php:39:                                @foreach ($option->values as $value)
resources/views/livewire/storefront/products/show.blade.php:40:                                    @php($selected = ($selectedOptions[$option->name] ?? null) === $value->value)
resources/views/livewire/storefront/products/show.blade.php:43:                                        wire:click="selectOption(@js($option->name), @js($value->value))"
resources/views/livewire/storefront/products/show.blade.php:70:                    {{ $this->canAddToCart() ? 'Add to cart' : 'Sold out' }}
app/Services/VariantMatrixService.php:20:            $product->load(['options.values', 'variants.optionValues']);
app/Services/VariantMatrixService.php:22:            $valueGroups = $product->options
app/Services/VariantMatrixService.php:24:                ->map(fn ($option) => $option->values->sortBy('position')->values())
app/Services/VariantMatrixService.php:36:                return $this->combinationKey($variant->optionValues->pluck('id')->all());
app/Services/VariantMatrixService.php:45:                    continue;
app/Services/VariantMatrixService.php:49:                $variant->optionValues()->sync($combination);
app/Services/VariantMatrixService.php:57:                $key = $this->combinationKey($variant->optionValues->pluck('id')->all());
app/Services/VariantMatrixService.php:60:                    continue;
app/Services/VariantMatrixService.php:74:        $variants = $product->variants()->with('optionValues')->get();
app/Services/VariantMatrixService.php:101:        $defaultVariant->optionValues()->detach();
app/Services/VariantMatrixService.php:120:                continue;
app/Services/VariantMatrixService.php:124:                $variant->optionValues()->detach();
resources/views/livewire/storefront/cart/show.blade.php:38:                                    {{ $line->variant->optionValues->map(fn ($value) => $value->option->name.': '.$value->value)->implode(' / ') ?: ($line->variant->sku ?: 'Default') }}
resources/views/livewire/storefront/cart/show.blade.php:130:                            <flux:select.option value="DE">Germany</flux:select.option>
resources/views/livewire/storefront/cart/show.blade.php:131:                            <flux:select.option value="AT">Austria</flux:select.option>
resources/views/livewire/storefront/cart/show.blade.php:132:                            <flux:select.option value="CH">Switzerland</flux:select.option>
app/Services/SearchService.php:437:                continue;
app/Enums/PageStatus.php:7:    case Draft = 'draft';
app/Enums/ThemeStatus.php:7:    case Draft = 'draft';
app/Enums/ProductStatus.php:7:    case Draft = 'draft';
app/Services/DiscountService.php:128:                continue;
database/factories/ProductFactory.php:39:    public function draft(): static
app/Enums/CollectionStatus.php:7:    case Draft = 'draft';
app/Enums/DiscountStatus.php:7:    case Draft = 'draft';
database/factories/InventoryItemFactory.php:45:    public function continuePolicy(): static
database/factories/RefundFactory.php:26:            'reason' => fake()->optional()->sentence(),
database/factories/ProductOptionValueFactory.php:21:            'product_option_id' => ProductOption::factory(),
app/Livewire/Admin/Products/Form.php:58:    public array $options = [];
app/Livewire/Admin/Products/Form.php:61:     * @var array<int, array{id: int|null, label: string, sku: string, price: string, compareAtPrice: string, quantity: int, requiresShipping: bool, options: array<string, string>}>
app/Livewire/Admin/Products/Form.php:82:            $this->product = $product->load(['options.values', 'variants.inventoryItem', 'variants.optionValues.option', 'collections', 'media']);
app/Livewire/Admin/Products/Form.php:96:            'options' => [],
app/Livewire/Admin/Products/Form.php:109:        $this->options[] = [
app/Livewire/Admin/Products/Form.php:117:        unset($this->options[$index]);
app/Livewire/Admin/Products/Form.php:118:        $this->options = array_values($this->options);
app/Livewire/Admin/Products/Form.php:123:        $optionPayload = $this->optionPayload();
app/Livewire/Admin/Products/Form.php:125:        if ($optionPayload === []) {
app/Livewire/Admin/Products/Form.php:135:                'options' => [],
app/Livewire/Admin/Products/Form.php:142:            ->keyBy(fn (array $variant): string => $this->variantOptionKey($variant['options'] ?? []));
app/Livewire/Admin/Products/Form.php:145:        $this->variants = collect($this->optionCombinations($optionPayload))
app/Livewire/Admin/Products/Form.php:146:            ->map(function (array $options) use ($existingVariants, $template): array {
app/Livewire/Admin/Products/Form.php:147:                $existingVariant = $existingVariants->get($this->variantOptionKey($options));
app/Livewire/Admin/Products/Form.php:151:                    'label' => $this->variantLabel($options),
app/Livewire/Admin/Products/Form.php:157:                    'options' => $options,
app/Livewire/Admin/Products/Form.php:174:            'status' => ['required', Rule::in(['draft', 'active', 'archived'])],
app/Livewire/Admin/Products/Form.php:206:                    'options' => $this->optionPayload(),
app/Livewire/Admin/Products/Form.php:232:        $this->product = $product->load(['options.values', 'variants.inventoryItem', 'variants.optionValues.option', 'collections', 'media']);
app/Livewire/Admin/Products/Form.php:250:        $this->product = $product->refresh()->load(['options.values', 'variants.inventoryItem', 'variants.optionValues.option', 'collections', 'media']);
app/Livewire/Admin/Products/Form.php:388:        $this->options = $product->options
app/Livewire/Admin/Products/Form.php:389:            ->map(fn (ProductOption $option): array => [
app/Livewire/Admin/Products/Form.php:390:                'name' => $option->name,
app/Livewire/Admin/Products/Form.php:391:                'values' => $option->values->pluck('value')->implode(', '),
app/Livewire/Admin/Products/Form.php:397:                'label' => $variant->optionValues->isEmpty()
app/Livewire/Admin/Products/Form.php:399:                    : $variant->optionValues->map(fn (ProductOptionValue $value): string => $value->value)->implode(' / '),
app/Livewire/Admin/Products/Form.php:405:                'options' => $variant->optionValues
app/Livewire/Admin/Products/Form.php:406:                    ->mapWithKeys(fn (ProductOptionValue $value): array => [$value->option?->name ?? 'Option' => $value->value])
app/Livewire/Admin/Products/Form.php:436:    private function optionPayload(): array
app/Livewire/Admin/Products/Form.php:438:        return collect($this->options)
app/Livewire/Admin/Products/Form.php:439:            ->map(function (array $option, int $position): array {
app/Livewire/Admin/Products/Form.php:441:                    'name' => $option['name'],
app/Livewire/Admin/Products/Form.php:443:                    'values' => collect(explode(',', $option['values']))
app/Livewire/Admin/Products/Form.php:454:            ->filter(fn (array $option): bool => $option['name'] !== '' && $option['values'] !== [])
app/Livewire/Admin/Products/Form.php:474:                'options' => $variant['options'] ?? [],
app/Livewire/Admin/Products/Form.php:505:                    'policy' => 'deny',
app/Livewire/Admin/Products/Form.php:509:            $variant->optionValues()->sync($this->optionValueIdsForVariant($product, $variantData['options'] ?? []));
app/Livewire/Admin/Products/Form.php:530:        $optionPayload = $this->optionPayload();
app/Livewire/Admin/Products/Form.php:533:        foreach ($optionPayload as $optionData) {
app/Livewire/Admin/Products/Form.php:534:            $option = ProductOption::withoutGlobalScopes()
app/Livewire/Admin/Products/Form.php:536:                ->where('position', $optionData['position'])
app/Livewire/Admin/Products/Form.php:538:                ?? $product->options()->create([
app/Livewire/Admin/Products/Form.php:539:                    'name' => $optionData['name'],
app/Livewire/Admin/Products/Form.php:540:                    'position' => $optionData['position'],
app/Livewire/Admin/Products/Form.php:543:            $option->forceFill([
app/Livewire/Admin/Products/Form.php:544:                'name' => $optionData['name'],
app/Livewire/Admin/Products/Form.php:545:                'position' => $optionData['position'],
app/Livewire/Admin/Products/Form.php:548:            $syncedOptionIds[] = $option->getKey();
app/Livewire/Admin/Products/Form.php:551:            foreach ($optionData['values'] as $valueData) {
app/Livewire/Admin/Products/Form.php:553:                    ->where('product_option_id', $option->getKey())
app/Livewire/Admin/Products/Form.php:556:                    ?? $option->values()->create([
app/Livewire/Admin/Products/Form.php:570:                ->where('product_option_id', $option->getKey())
app/Livewire/Admin/Products/Form.php:583:        $desiredKeys = collect($this->optionCombinations($this->optionPayload()))
app/Livewire/Admin/Products/Form.php:584:            ->map(fn (array $options): string => $this->variantOptionKey($options))
app/Livewire/Admin/Products/Form.php:589:            ->map(fn (array $variant): string => $this->variantOptionKey($variant['options'] ?? []))
app/Livewire/Admin/Products/Form.php:600:     * @param  array<int, array{name: string, position: int, values: array<int, array{value: string, position: int}>}>  $options
app/Livewire/Admin/Products/Form.php:603:    private function optionCombinations(array $options): array
app/Livewire/Admin/Products/Form.php:605:        if ($options === []) {
app/Livewire/Admin/Products/Form.php:609:        return collect($options)
app/Livewire/Admin/Products/Form.php:610:            ->reduce(function (array $combinations, array $option): array {
app/Livewire/Admin/Products/Form.php:614:                    foreach ($option['values'] as $value) {
app/Livewire/Admin/Products/Form.php:617:                            $option['name'] => $value['value'],
app/Livewire/Admin/Products/Form.php:627:     * @param  array<string, string>  $options
app/Livewire/Admin/Products/Form.php:629:    private function variantOptionKey(array $options): string
app/Livewire/Admin/Products/Form.php:631:        ksort($options);
app/Livewire/Admin/Products/Form.php:633:        return collect($options)
app/Livewire/Admin/Products/Form.php:639:     * @param  array<string, string>  $options
app/Livewire/Admin/Products/Form.php:641:    private function variantLabel(array $options): string
app/Livewire/Admin/Products/Form.php:643:        return $options === [] ? 'Default' : implode(' / ', array_values($options));
app/Livewire/Admin/Products/Form.php:647:     * @param  array<string, string>  $options
app/Livewire/Admin/Products/Form.php:650:    private function optionValueIdsForVariant(Product $product, array $options): array
app/Livewire/Admin/Products/Form.php:652:        if ($options === []) {
app/Livewire/Admin/Products/Form.php:656:        return collect($options)
app/Livewire/Admin/Products/Form.php:657:            ->map(function (string $value, string $optionName) use ($product): int {
app/Livewire/Admin/Products/Form.php:660:                    ->whereHas('option', function ($query) use ($optionName, $product): void {
app/Livewire/Admin/Products/Form.php:664:                            ->where('name', $optionName);
app/Livewire/Admin/Products/Form.php:800:        $this->product = $this->productForAction()->load(['options.values', 'variants.inventoryItem', 'variants.optionValues.option', 'collections', 'media']);
app/Livewire/Admin/Themes/Editor.php:139:     * @return array<string, array{label: string, fields: array<int, array{key: string, label: string, type: string, options?: array<string, string>}>}>
app/Livewire/Admin/Themes/Editor.php:167:                    ['key' => 'home.featured_product_limit', 'label' => 'Featured products', 'type' => 'number'],
app/Livewire/Admin/Themes/Editor.php:168:                    ['key' => 'home.featured_collection_limit', 'label' => 'Featured collections', 'type' => 'number'],
app/Http/Controllers/Api/Admin/V1/ProductController.php:21:            'status' => ['nullable', Rule::in(['draft', 'active', 'archived'])],
app/Http/Controllers/Api/Admin/V1/ProductController.php:82:            'options.values',
app/Http/Controllers/Api/Admin/V1/ProductController.php:84:            'variants.optionValues.option',
app/Livewire/Storefront/Collections/Show.php:19:    public string $sort = 'featured';
app/Livewire/Storefront/Collections/Show.php:77:                        ->where('policy', 'continue')
app/Livewire/Storefront/Home.php:23:    public function featuredProducts(): SupportCollection
app/Livewire/Storefront/Home.php:31:            ->limit((int) data_get($this->themeSettings(), 'home.featured_product_limit', 8))
app/Livewire/Storefront/Home.php:35:    public function featuredCollections(): SupportCollection
app/Livewire/Storefront/Home.php:41:            ->limit((int) data_get($this->themeSettings(), 'home.featured_collection_limit', 4))
app/Livewire/Storefront/Home.php:57:            'featuredProducts' => $this->featuredProducts(),
app/Livewire/Storefront/Home.php:58:            'featuredCollections' => $this->featuredCollections(),
app/Services/ProductService.php:49:            foreach ($data['options'] ?? [] as $optionData) {
app/Services/ProductService.php:50:                $option = $product->options()->create(Arr::only($optionData, ['name', 'position']));
app/Services/ProductService.php:52:                foreach ($optionData['values'] ?? [] as $valueData) {
app/Services/ProductService.php:53:                    $option->values()->create(Arr::only($valueData, ['value', 'position']));
app/Services/ProductService.php:128:            throw InvalidProductTransitionException::because('Products with order history cannot be reverted to draft.');
app/Services/ProductService.php:148:            throw InvalidProductTransitionException::because('Only draft products with no order history can be deleted.');
app/Services/ProductService.php:184:                'policy' => $variantData['inventory_policy'] ?? 'deny',
app/Services/ProductService.php:198:        if (isset($variantData['option_value_ids'])) {
app/Services/ProductService.php:199:            $valueIds = collect($variantData['option_value_ids'])
app/Services/ProductService.php:206:                ->whereHas('option', fn ($query) => $query->where('product_id', $product->getKey()))
app/Services/ProductService.php:210:                throw new InvalidArgumentException('Variant option values must belong to the product being created.');
app/Services/ProductService.php:213:            $variant->optionValues()->sync($valueIds);
app/Services/ProductService.php:218:        if (! isset($variantData['options']) || ! is_array($variantData['options'])) {
app/Services/ProductService.php:224:        foreach ($variantData['options'] as $optionName => $optionValue) {
app/Services/ProductService.php:226:                ->where('value', (string) $optionValue)
app/Services/ProductService.php:227:                ->whereHas('option', function ($query) use ($product, $optionName): void {
app/Services/ProductService.php:230:                        ->where('name', (string) $optionName);
app/Services/ProductService.php:235:                throw new InvalidArgumentException("Variant option selection [{$optionName}: {$optionValue}] is invalid for this product.");
app/Services/ProductService.php:241:        $variant->optionValues()->sync($valueIds);
app/Http/Controllers/Api/Admin/V1/DiscountController.php:161:            'status' => ['sometimes', Rule::in(['draft', 'active', 'expired', 'disabled'])],
app/Livewire/Storefront/Products/Show.php:37:            $this->selectedOptions = $variant->optionValues
app/Livewire/Storefront/Products/Show.php:38:                ->mapWithKeys(fn (ProductOptionValue $value): array => [$value->option->name => $value->value])
app/Livewire/Storefront/Products/Show.php:43:    public function selectOption(string $optionName, string $value): void
app/Livewire/Storefront/Products/Show.php:45:        $this->selectedOptions[$optionName] = $value;
app/Livewire/Storefront/Products/Show.php:109:            ->with(['options.values', 'variants.inventoryItem', 'variants.optionValues.option', 'collections'])
app/Livewire/Storefront/Products/Show.php:120:        if ($product->options->isEmpty()) {
app/Livewire/Storefront/Products/Show.php:125:            $options = $variant->optionValues
app/Livewire/Storefront/Products/…202 tokens truncated…y_html' => "<p>{$store->name} is the demo storefront for this self-contained shop platform.</p><p>The catalog includes multi-variant products, sale pricing, inventory rules, backorder handling, and digital product examples for checkout and storefront testing.</p>",
database/factories/CollectionFactory.php:35:    public function draft(): static
app/Livewire/Admin/Collections/Form.php:85:            'status' => ['required', Rule::in(['draft', 'active', 'archived'])],
app/Services/Tax/ManualTaxProvider.php:51:                continue;
app/Services/Tax/ManualTaxProvider.php:55:                continue;
app/Auth/CustomerUserProvider.php:30:                continue;
app/Services/ThemeSettingsService.php:75:                'featured_product_limit' => 8,
app/Services/ThemeSettingsService.php:76:                'featured_collection_limit' => 4,
app/Http/Controllers/Api/Admin/V1/CollectionController.php:25:            'status' => ['nullable', Rule::in(['draft', 'active', 'archived'])],
app/Http/Controllers/Api/Admin/V1/CollectionController.php:137:            'status' => ['sometimes', Rule::in(['draft', 'active', 'archived'])],
app/Livewire/Settings/TwoFactor.php:49:        $this->requiresConfirmation = Features::optionEnabled(Features::twoFactorAuthentication(), 'confirm');
app/Livewire/Storefront/Cart/Show.php:162:            'lines.variant.optionValues.option',
app/Http/Controllers/Api/Storefront/V1/CartController.php:42:            'lines.variant.optionValues.option',
app/Livewire/Storefront/CartDrawer.php:94:            'lines.variant.optionValues.option',
app/Http/Controllers/Api/Storefront/V1/CartLineController.php:89:            'lines.variant.optionValues.option',
app/Livewire/Storefront/Checkout/Show.php:275:            'lines.variant.optionValues.option',
app/Livewire/Storefront/Checkout/Show.php:299:        return $checkout->load(['cart.lines.variant.product', 'cart.lines.variant.optionValues.option']);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:150:            'cart.lines.variant.optionValues.option',
app/Services/ThemeArchiveInstaller.php:24:        'sections/featured-products.blade.php',
app/Services/ThemeArchiveInstaller.php:122:                    continue;
app/Services/ThemeArchiveInstaller.php:128:                    continue;
database/seeders/NavigationItemSeeder.php:73:        $newArrivals = $this->collection($store, 'new-arrivals') ?? $this->collection($store, 'featured');
database/seeders/NavigationItemSeeder.php:93:            $about ? ['label' => 'About', 'type' => 'page', 'resource_id' => $about->getKey()] : null,
database/seeders/NavigationItemSeeder.php:108:            $about ? ['label' => 'About', 'type' => 'page', 'resource_id' => $about->getKey()] : null,
app/Services/OrderService.php:277:        $optionValues = $variant?->optionValues
app/Services/OrderService.php:278:            ->sortBy(fn (ProductOptionValue $value): int => $value->option?->position ?? $value->position)
app/Services/OrderService.php:283:        return $optionValues ? "{$title} - {$optionValues}" : $title;
app/Services/OrderService.php:308:                    continue;
app/Services/OrderService.php:438:                'variant.optionValues' => fn ($query) => $query->withoutGlobalScopes(),
app/Services/OrderService.php:439:                'variant.optionValues.option' => fn ($query) => $query->withoutGlobalScopes(),
database/seeders/ProductSeeder.php:53:            $optionValueIds = $this->createOptions($product, $data['options'] ?? []);
database/seeders/ProductSeeder.php:54:            $this->createVariants($store, $product, $data, $optionValueIds);
database/seeders/ProductSeeder.php:86:     * @param  array<string, array<int, string>>  $options
database/seeders/ProductSeeder.php:89:    private function createOptions(Product $product, array $options): array
database/seeders/ProductSeeder.php:91:        $optionValueIds = [];
database/seeders/ProductSeeder.php:93:        foreach ($options as $optionPosition => $valuesByName) {
database/seeders/ProductSeeder.php:94:            $optionName = (string) array_key_first($valuesByName);
database/seeders/ProductSeeder.php:95:            $option = ProductOption::withoutGlobalScopes()->create([
database/seeders/ProductSeeder.php:97:                'name' => $optionName,
database/seeders/ProductSeeder.php:98:                'position' => $optionPosition,
database/seeders/ProductSeeder.php:101:            foreach (array_values($valuesByName[$optionName]) as $valuePosition => $value) {
database/seeders/ProductSeeder.php:102:                $optionValue = ProductOptionValue::withoutGlobalScopes()->create([
database/seeders/ProductSeeder.php:103:                    'product_option_id' => $option->getKey(),
database/seeders/ProductSeeder.php:108:                $optionValueIds[$optionName][$value] = $optionValue->getKey();
database/seeders/ProductSeeder.php:112:        return $optionValueIds;
database/seeders/ProductSeeder.php:117:     * @param  array<string, array<string, int>>  $optionValueIds
database/seeders/ProductSeeder.php:119:    private function createVariants(Store $store, Product $product, array $data, array $optionValueIds): void
database/seeders/ProductSeeder.php:126:                'sku' => $variantData['sku'] ?? $this->sku($data['sku_prefix'] ?? Str::upper(Str::slug($data['handle'], '-')), $variantData['options'] ?? []),
database/seeders/ProductSeeder.php:144:                    'policy' => $variantData['policy'] ?? 'deny',
database/seeders/ProductSeeder.php:148:            $selectedOptions = $variantData['options'] ?? [];
database/seeders/ProductSeeder.php:151:                $variant->optionValues()->sync($this->selectedOptionValueIds($selectedOptions, $optionValueIds));
database/seeders/ProductSeeder.php:162:        $options = $data['options'] ?? [];
database/seeders/ProductSeeder.php:165:        if ($options === []) {
database/seeders/ProductSeeder.php:168:                'options' => [],
database/seeders/ProductSeeder.php:173:        return collect($this->optionCombinations($options))
database/seeders/ProductSeeder.php:176:                'options' => $selection,
database/seeders/ProductSeeder.php:182:     * @param  array<int, array<string, array<int, string>>>  $options
database/seeders/ProductSeeder.php:185:    private function optionCombinations(array $options): array
database/seeders/ProductSeeder.php:189:        foreach ($options as $valuesByName) {
database/seeders/ProductSeeder.php:190:            $optionName = (string) array_key_first($valuesByName);
database/seeders/ProductSeeder.php:194:                foreach ($valuesByName[$optionName] as $value) {
database/seeders/ProductSeeder.php:197:                        $optionName => $value,
database/seeders/ProductSeeder.php:210:     * @param  array<string, array<string, int>>  $optionValueIds
database/seeders/ProductSeeder.php:213:    private function selectedOptionValueIds(array $selectedOptions, array $optionValueIds): array
database/seeders/ProductSeeder.php:216:            ->map(fn (string $value, string $optionName): int => $optionValueIds[$optionName][$value])
database/seeders/ProductSeeder.php:273:            $this->product('Classic Cotton T-Shirt', 'classic-cotton-t-shirt', 'Acme Basics', 'T-Shirts', ['new', 'popular'], ['new-arrivals', 't-shirts'], '<p>A timeless classic cotton t-shirt. Comfortable, breathable, and perfect for everyday wear.</p>', [['Size' => ['S', 'M', 'L', 'XL']], ['Color' => ['White', 'Black', 'Navy']]], ['price_amount' => 2499, 'weight_g' => 200, 'quantity_on_hand' => 15], 'ACME-CTSH'),
database/seeders/ProductSeeder.php:274:            $this->product('Premium Slim Fit Jeans', 'premium-slim-fit-jeans', 'Acme Denim', 'Pants', ['new', 'sale'], ['new-arrivals', 'pants-jeans', 'sale'], '<p>Slim fit jeans crafted from premium stretch denim. Comfortable all-day wear with a modern silhouette.</p>', [['Size' => ['28', '30', '32', '34', '36']], ['Color' => ['Blue', 'Black']]], ['price_amount' => 7999, 'compare_at_amount' => 9999, 'weight_g' => 800, 'quantity_on_hand' => 8], 'ACME-JNS'),
database/seeders/ProductSeeder.php:278:            $this->product('Graphic Print Tee', 'graphic-print-tee', 'Acme Basics', 'T-Shirts', ['new'], ['t-shirts'], '<p>Bold graphic print on soft cotton. Express yourself with this statement piece.</p>', [['Size' => ['S', 'M', 'L', 'XL']]], ['price_amount' => 2999, 'weight_g' => 210, 'quantity_on_hand' => 18], 'ACME-GTEE'),
database/seeders/ProductSeeder.php:279:            $this->product('V-Neck Linen Tee', 'v-neck-linen-tee', 'Acme Basics', 'T-Shirts', ['popular'], ['t-shirts'], '<p>Lightweight linen blend v-neck. Perfect for warm summer days.</p>', [['Size' => ['S', 'M', 'L']], ['Color' => ['Beige', 'Olive', 'Sky Blue']]], ['price_amount' => 3499, 'weight_g' => 180, 'quantity_on_hand' => 12], 'ACME-VNECK'),
database/seeders/ProductSeeder.php:280:            $this->product('Striped Polo Shirt', 'striped-polo-shirt', 'Acme Basics', 'T-Shirts', ['sale'], ['t-shirts', 'sale'], '<p>Classic striped polo with a modern relaxed fit. Knitted collar and two-button placket.</p>', [['Size' => ['S', 'M', 'L', 'XL']]], ['price_amount' => 2799, 'compare_at_amount' => 3999, 'weight_g' => 250, 'quantity_on_hand' => 10], 'ACME-POLO'),
database/seeders/ProductSeeder.php:287:            $this->product('Unreleased Winter Jacket', 'unreleased-winter-jacket', 'Acme Outerwear', 'Jackets', ['limited'], [], '<p>Upcoming winter collection piece. Insulated puffer jacket with water-resistant shell.</p>', [['Size' => ['S', 'M', 'L', 'XL']]], ['price_amount' => 14999, 'weight_g' => 900, 'quantity_on_hand' => 0], 'ACME-WINTER', 'draft', null),
database/seeders/ProductSeeder.php:288:            $this->product('Discontinued Raincoat', 'discontinued-raincoat', 'Acme Outerwear', 'Jackets', [], [], '<p>Lightweight waterproof raincoat. This product has been discontinued.</p>', [['Size' => ['M', 'L']]], ['price_amount' => 8999, 'weight_g' => 400, 'quantity_on_hand' => 3], 'ACME-RAIN', 'archived', now()->subMonths(6)),
database/seeders/ProductSeeder.php:289:            $this->product('Limited Edition Sneakers', 'limited-edition-sneakers', 'Acme Sport', 'Shoes', ['limited'], [], '<p>Limited edition collaboration sneakers. Once they are gone, they are gone.</p>', [['Size' => ['EU 40', 'EU 42', 'EU 44']]], ['price_amount' => 15999, 'weight_g' => 650, 'quantity_on_hand' => 0, 'policy' => 'deny'], 'ACME-LIMITED'),
database/seeders/ProductSeeder.php:290:            $this->product('Backorder Denim Jacket', 'backorder-denim-jacket', 'Acme Denim', 'Jackets', ['popular'], [], '<p>Classic denim jacket. Currently on backorder - ships within 2-3 weeks.</p>', [['Size' => ['S', 'M', 'L', 'XL']]], ['price_amount' => 9999, 'weight_g' => 750, 'quantity_on_hand' => 0, 'policy' => 'continue'], 'ACME-BACKORDER'),
database/seeders/ProductSeeder.php:292:                ['options' => ['Amount' => '25 EUR'], 'sku' => 'ACME-GIFT-25', 'price_amount' => 2500, 'weight_g' => 0, 'requires_shipping' => false, 'quantity_on_hand' => 9999],
database/seeders/ProductSeeder.php:293:                ['options' => ['Amount' => '50 EUR'], 'sku' => 'ACME-GIFT-50', 'price_amount' => 5000, 'weight_g' => 0, 'requires_shipping' => false, 'quantity_on_hand' => 9999],
database/seeders/ProductSeeder.php:294:                ['options' => ['Amount' => '100 EUR'], 'sku' => 'ACME-GIFT-100', 'price_amount' => 10000, 'weight_g' => 0, 'requires_shipping' => false, 'quantity_on_hand' => 9999],
database/seeders/ProductSeeder.php:306:            $this->product('Pro Laptop 15', 'pro-laptop-15', 'TechCorp', 'Laptops', ['featured'], ['featured'], '<p>Performance laptop for tenant isolation tests.</p>', [['Storage' => ['256GB', '512GB', '1TB']]], ['price_amount' => 99999, 'weight_g' => 1800, 'quantity_on_hand' => 10], 'TECH-LAPTOP', variants: [
database/seeders/ProductSeeder.php:307:                ['options' => ['Storage' => '256GB'], 'sku' => 'TECH-LAPTOP-256', 'price_amount' => 99999, 'weight_g' => 1800, 'quantity_on_hand' => 10],
database/seeders/ProductSeeder.php:308:                ['options' => ['Storage' => '512GB'], 'sku' => 'TECH-LAPTOP-512', 'price_amount' => 119999, 'weight_g' => 1800, 'quantity_on_hand' => 10],
database/seeders/ProductSeeder.php:309:                ['options' => ['Storage' => '1TB'], 'sku' => 'TECH-LAPTOP-1TB', 'price_amount' => 149999, 'weight_g' => 1800, 'quantity_on_hand' => 10],
database/seeders/ProductSeeder.php:311:            $this->product('Wireless Headphones', 'wireless-headphones', 'AudioMax', 'Audio', ['featured'], ['featured'], '<p>Wireless headphones for tenant isolation tests.</p>', [['Color' => ['Black', 'Silver']]], ['price_amount' => 14999, 'weight_g' => 250, 'quantity_on_hand' => 25], 'TECH-HEADPHONES'),
database/seeders/ProductSeeder.php:313:            $this->product('Mechanical Keyboard', 'mechanical-keyboard', 'KeyTech', 'Peripherals', ['featured'], ['featured'], '<p>Mechanical keyboard with selectable switch types.</p>', [['Switch Type' => ['Red', 'Blue', 'Brown']]], ['price_amount' => 12999, 'weight_g' => 1100, 'quantity_on_hand' => 15], 'TECH-KEYBOARD'),
database/seeders/ProductSeeder.php:319:     * @param  array<int, array<string, array<int, string>>>  $options
database/seeders/ProductSeeder.php:332:        array $options,
database/seeders/ProductSeeder.php:348:            'published_at' => $status === 'draft' ? null : ($publishedAt ?? now()),
database/seeders/ProductSeeder.php:349:            'options' => $options,
database/seeders/ProductSeeder.php:353:                'policy' => 'deny',
database/seeders/ThemeFileSeeder.php:21:                'sections/featured-products.blade.php',
database/seeders/ThemeFileSeeder.php:48:            'sections/featured-products.blade.php' => "<section class=\"featured-products\">\n    @foreach(\$products as \$product)\n        <article>{{ \$product->title }}</article>\n    @endforeach\n</section>\n",
app/Http/Resources/Admin/V1/ProductResource.php:25:            'description_html' => $this->when($this->relationLoaded('options'), $this->description_html),
app/Http/Resources/Admin/V1/ProductResource.php:34:            'featured_image' => $this->when($this->relationLoaded('media'), function (): ?array {
app/Http/Resources/Admin/V1/ProductResource.php:39:            'options' => $this->whenLoaded('options', fn () => $this->options->map(fn ($option): array => [
app/Http/Resources/Admin/V1/ProductResource.php:40:                'id' => $option->id,
app/Http/Resources/Admin/V1/ProductResource.php:41:                'name' => $option->name,
app/Http/Resources/Admin/V1/ProductResource.php:42:                'position' => $option->position,
app/Http/Resources/Admin/V1/ProductResource.php:43:                'values' => $option->values->map(fn ($value): array => [
app/Http/Resources/Admin/V1/ProductResource.php:50:                $this->relationLoaded('variants') && $this->relationLoaded('options'),
app/Http/Resources/Admin/V1/ProductResource.php:63:                    'option_values' => $variant->optionValues->map(fn ($value): array => [
app/Http/Resources/Admin/V1/ProductResource.php:64:                        'option_name' => $value->option?->name,
database/seeders/CollectionSeeder.php:18:                ['title' => 'New Arrivals', 'handle' => 'new-arrivals', 'description_html' => '<p>Discover the latest additions to our store.</p>'],
database/seeders/CollectionSeeder.php:19:                ['title' => 'T-Shirts', 'handle' => 't-shirts', 'description_html' => '<p>Premium cotton tees for every occasion.</p>'],
database/seeders/CollectionSeeder.php:24:                ['title' => 'Featured', 'handle' => 'featured', 'description_html' => '<p>Featured electronics for tenant isolation tests.</p>'],
app/Http/Resources/Storefront/V1/CartLineResource.php:34:                'options' => $this->variant->relationLoaded('optionValues')
app/Http/Resources/Storefront/V1/CartLineResource.php:35:                    ? $this->variant->optionValues->map(fn ($value): array => [
app/Http/Resources/Storefront/V1/CartLineResource.php:36:                        'name' => $value->option?->name,
app/Models/InventoryItem.php:36:        'policy' => 'deny',
app/Models/Theme.php:33:        'status' => 'draft',
app/Models/Product.php:37:        'status' => 'draft',
app/Models/Product.php:52:    public function options(): HasMany
database/migrations/2026_05_03_213902_create_collections_table.php:21:            $table->enum('status', ['draft', 'active', 'archived'])->default('active');
app/Models/ProductVariant.php:148:    public function optionValues(): BelongsToMany
app/Models/ProductVariant.php:150:        return $this->belongsToMany(ProductOptionValue::class, 'variant_option_values', 'variant_id', 'product_option_value_id');
app/Models/Page.php:32:        'status' => 'draft',
database/migrations/2026_05_03_213857_create_product_options_table.php:14:        Schema::create('product_options', function (Blueprint $table) {
database/migrations/2026_05_03_213857_create_product_options_table.php:30:        Schema::dropIfExists('product_options');
database/migrations/2026_05_03_223824_create_themes_table.php:19:            $table->enum('status', ['draft', 'published'])->default('draft');
database/migrations/2026_05_03_223841_create_pages_table.php:20:            $table->enum('status', ['draft', 'published', 'archived'])->default('draft');
database/migrations/0001_01_01_000002_create_jobs_table.php:31:            $table->mediumText('options')->nullable();
database/migrations/2026_05_03_225427_create_discounts_table.php:26:            $table->enum('status', ['draft', 'active', 'expired', 'disabled'])->default('active');
app/Models/ProductOptionValue.php:22:        'product_option_id',
app/Models/ProductOptionValue.php:47:            $builder->whereHas('option.product', function (Builder $query) use ($store): void {
app/Models/ProductOptionValue.php:58:    public function option(): BelongsTo
app/Models/ProductOptionValue.php:60:        return $this->belongsTo(ProductOption::class, 'product_option_id');
app/Models/ProductOptionValue.php:68:        return $this->belongsToMany(ProductVariant::class, 'variant_option_values', 'product_option_value_id', 'variant_id');
database/migrations/2026_05_03_213900_create_variant_option_values_table.php:14:        Schema::create('variant_option_values', function (Blueprint $table) {
database/migrations/2026_05_03_213900_create_variant_option_values_table.php:16:            $table->foreignId('product_option_value_id')->constrained()->cascadeOnDelete();
database/migrations/2026_05_03_213900_create_variant_option_values_table.php:18:            $table->primary(['variant_id', 'product_option_value_id']);
database/migrations/2026_05_03_213900_create_variant_option_values_table.php:19:            $table->index('product_option_value_id');
database/migrations/2026_05_03_213900_create_variant_option_values_table.php:28:        Schema::dropIfExists('variant_option_values');
database/migrations/2026_05_03_213856_create_products_table.php:19:            $table->enum('status', ['draft', 'active', 'archived'])->default('draft');
database/migrations/2026_05_03_213858_create_product_option_values_table.php:14:        Schema::create('product_option_values', function (Blueprint $table) {
database/migrations/2026_05_03_213858_create_product_option_values_table.php:16:            $table->foreignId('product_option_id')->constrained()->cascadeOnDelete();
database/migrations/2026_05_03_213858_create_product_option_values_table.php:20:            $table->index('product_option_id');
database/migrations/2026_05_03_213858_create_product_option_values_table.php:21:            $table->unique(['product_option_id', 'position']);
database/migrations/2026_05_03_213858_create_product_option_values_table.php:30:        Schema::dropIfExists('product_option_values');
database/migrations/2026_05_03_213901_create_inventory_items_table.php:20:            $table->enum('policy', ['deny', 'continue'])->default('deny');


Output:
Chunk ID: 616549
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1255
Output:
## Suite 7: Storefront Browsing

**File:** `tests/Browser/Storefront/BrowsingTest.php`

**Purpose:** Verify all storefront pages render correctly as a guest visitor - home page, collection listings, product detail with variant options, search results, static pages, and content visibility rules (draft/stock).

### Storefront Page Map

```mermaid
flowchart LR
    Home["/"] --> Collections["/collections"]
    Home --> Product["/products/{handle}"]
    Collections --> CollectionDetail["/collections/{handle}"]
    CollectionDetail --> Product
    Home --> Search["/search?q=..."]
    Search --> Product
    Home --> Pages["/pages/{handle}"]
    Product --> Cart["/cart"]
```

---

### Test 7.1: Shows featured products on home page

**Preconditions:** Seeded products

**Steps:**
1. Navigate to `/`

**Expected Results:**
- Page displays "Acme Fashion"
- Page displays "Classic Cotton T-Shirt"
- Page displays "24.99"
- No JavaScript errors

---

### Test 7.2: Shows collection with product grid

**Preconditions:** Seeded collections and products

**Steps:**
1. Navigate to `/collections/t-shirts`

**Expected Results:**
- Page displays "T-Shirts"
- Page displays "Classic Cotton T-Shirt"
- No JavaScript errors

---

### Test 7.3: Can navigate from collection to product

**Preconditions:** Seeded collections and products

**Steps:**
1. Navigate to `/collections/t-shirts`
2. Click "Classic Cotton T-Shirt"

**Expected Results:**
- Page displays "Classic Cotton T-Shirt"
- Page displays "24.99"
- Page displays "Add to cart"
- No JavaScript errors

---

### Test 7.4: Shows product detail with variant options

**Preconditions:** Product #1

**Steps:**
1. Navigate to `/products/classic-cotton-t-shirt`

**Expected Results:**
- Page displays "Classic Cotton T-Shirt"
- Page displays "24.99"
- Page displays "Size"
- Page displays "Color"
- No JavaScript errors

---

### Test 7.5: Shows size and color option values

**Preconditions:** Product #1

**Steps:**
1. Navigate to `/products/classic-cotton-t-shirt`

**Expected Results:**
- Page displays size options: "S", "M", "L", "XL"
- Page displays color options: "Black", "White", "Navy"
- No JavaScript errors

---

### Test 7.6: Updates price when variant changes on product with compare-at pricing

**Preconditions:** Product #2 with compare-at pricing

**Steps:**
1. Navigate to `/products/premium-slim-fit-jeans`
2. Select a variant that has a compare-at price (sale variant)

**Expected Results:**
- Page displays "Premium Slim Fit Jeans"
- Sale price is displayed
- Compare-at (original) price is shown with strikethrough styling
- No JavaScript errors

---

### Test 7.7: Shows search results for valid query

**Preconditions:** Seeded products

**Steps:**
1. Navigate to `/search?q=cotton`

**Expected Results:**
- Page displays "Classic Cotton T-Shirt" in results
- No JavaScript errors

---

### Test 7.8: Shows no results message for invalid query

**Preconditions:** None

**Steps:**
1. Navigate to `/search?q=zznonexistentproductzz`

**Expected Results:**
- Page displays "No results"
- No JavaScript errors

---

### Test 7.9: Does not show draft products on storefront collections

**Preconditions:** Product #15 with draft status

**Steps:**
1. Navigate to `/collections`

**Expected Results:**
- Product #15 (draft) must NOT appear anywhere in the listing
- No JavaScript errors

---

### Test 7.10: Does not show draft products in search results

**Preconditions:** Product #15 with draft status

**Steps:**
1. Navigate to `/search?q=draft`

**Expected Results:**
- No draft products appear in search results
- No JavaScript errors

---

### Test 7.11: Shows out of stock messaging for deny-policy product

**Preconditions:** Product #17 (0 stock, inventory policy = deny)

**Steps:**
1. Navigate to `/products/limited-edition-sneakers`

**Expected Results:**
- Page displays "Sold out"
- "Add to cart" button is disabled or hidden
- No JavaScript errors

---

### Test 7.12: Shows backorder messaging for continue-policy product

**Preconditions:** Product #18 (0 stock, inventory policy = continue)

**Steps:**
1. Navigate to `/products/backorder-denim-jacket`

**Expected Results:**
- Page displays "Available on backorder"
- "Add to cart" button is still enabled
- No JavaScript errors

---

### Test 7.13: Shows new arrivals collection

**Preconditions:** Seeded collections

**Steps:**
1. Navigate to `/collections/new-arrivals`

**Expected Results:**
- Page displays "New Arrivals"
- No JavaScript errors

---

### Test 7.14: Shows static about page

**Preconditions:** Seeded pages

**Steps:**
1. Navigate to `/pages/about`

**Expected Results:**
- Page displays "About"
- No JavaScript errors

---

### Test 7.15: Navigates between pages using the main navigation

**Preconditions:** Seeded store with navigation

**Steps:**
1. Navigate to `/`
2. Click "T-Shirts" in the main navigation menu

**Expected Results:**
- Page navigates to the T-Shirts collection
- Page displays "T-Shirts"
- No JavaScript errors

**Total: 15 tests**

---


Output:
Chunk ID: 5ef219
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 4073
Output:

    @php($hero = data_get($themeSettings, 'home.hero', []))

{{ data_get($hero, 'eyebrow') }}

{{ data_get($hero, 'heading', $store->name) }}

{{ data_get($hero, 'subheading') }}

                    <flux:button :href="data_get($hero, 'primary_url', '/collections')" wire:navigate variant="primary">{{ data_get($hero, 'primary_label', 'Shop') }}</flux:button>
                    <flux:button :href="data_get($hero, 'secondary_url', '/collections')" wire:navigate variant="ghost">{{ data_get($hero, 'secondary_label', 'View collections') }}</flux:button>

                @foreach ($featuredProducts->take(4) as $product)

getKey() }}">
                        <x-storefront.product-card :product="$product" />

                @endforeach

Featured collections

Curated paths through the current store catalog.

            All collections

            @foreach ($featuredCollections as $collection)
                handle) }}" class="group rounded-lg border border-zinc-200 bg-white p-5 transition hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700" wire:navigate wire:key="home-collection-{{ $collection->getKey() }}">

                        <flux:icon name="rectangle-stack" class="size-10" />

{{ $collection->title }}

{{ $collection->products_count }} products

            @endforeach

Featured products

Active products currently published for {{ $store->name }}.

            @foreach ($featuredProducts as $product)
                <x-storefront.product-card :product="$product" wire:key="home-product-{{ $product->getKey() }}" />
            @endforeach

    <x-storefront.breadcrumbs :items="[['label' => 'Collections']]" />

Collections

Browse curated groups of products from this store.

        @foreach ($collections as $collection)
            handle) }}" class="group rounded-lg border border-zinc-200 bg-white p-5 transition hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700" wire:navigate wire:key="collection-index-{{ $collection->getKey() }}">

                    <flux:icon name="rectangle-stack" class="size-10" />

{{ $collection->title }}

{{ $collection->products_count }} products

        @endforeach

    <x-storefront.breadcrumbs :items="[
        ['label' => 'Collections', 'url' => route('collections.index')],
        ['label' => $collection->title],
    ]" />

{{ $collection->title }}

        @if ($collection->description_html)

{!! $collection->description_html !!}

        @endif

Filters

                <button wire:click="clearFilters" class="text-sm font-medium text-blue-700 hover:underline dark:text-blue-300">Clear all</button>

                <flux:checkbox wire:model.live="inStock" label="In stock" />

Price

                        <flux:input wire:model.live.debounce.500ms="minPrice" type="number" min="0" placeholder="Min" aria-label="Minimum price" />
                        <flux:input wire:model.live.debounce.500ms="maxPrice" type="number" min="0" placeholder="Max" aria-label="Maximum price" />

Product type

                        @foreach ($productTypes as $type)
                            <flux:checkbox wire:model.live="types" value="{{ $type }}" :label="$type" wire:key="type-filter-{{ $type }}" />
                        @endforeach

Vendor

                        @foreach ($productVendors as $vendor)
                            <flux:checkbox wire:model.live="vendors" value="{{ $vendor }}" :label="$vendor" wire:key="vendor-filter-{{ $vendor }}" />
                        @endforeach

{{ $products->total() }} products

                <flux:select wire:model.live="sort" aria-label="Sort products" class="sm:max-w-56">
                    <flux:select.option value="featured">Featured</flux:select.option>
                    <flux:select.option value="price_asc">Price: Low to High</flux:select.option>
                    <flux:select.option value="price_desc">Price: High to Low</flux:select.option>
                    <flux:select.option value="newest">Newest</flux:select.option>
                </flux:select>

            @if ($products->isEmpty())

                        <flux:icon name="magnifying-glass" class="size-10 text-zinc-400" />

No products found

Try adjusting your filters or browse another collection.

                        <flux:button wire:click="clearFilters" variant="ghost">Clear filters</flux:button>

            @else

                    @foreach ($products as $product)
                        <x-storefront.product-card :product="$product" wire:key="collection-product-{{ $product->getKey() }}" />
                    @endforeach

                {{ $products->links() }}
            @endif

    <x-storefront.breadcrumbs :items="[
        ['label' => $product->collections->first()?->title ?? 'Products', 'url' => $product->collections->first() ? route('collections.show', $product->collections->first()->handle) : route('collections.index')],
        ['label' => $product->title],
    ]" />

                <flux:icon name="shopping-bag" class="size-20" />

                    @if ($selectedVariant?->compare_at_amount && $selectedVariant->compare_at_amount > $selectedVariant->price_amount)
                        Sale
                    @endif
                    @foreach ($product->tags ?? [] as $tag)
                        {{ $tag }}
                    @endforeach

{{ $product->title }}

                @if ($selectedVariant)
                    <x-storefront.price :amount="$selectedVariant->price_amount" :compare-at="$selectedVariant->compare_at_amount" :currency="$selectedVariant->currency" class="text-2xl" aria-live="polite" />
                @endif

            @if ($product->options->isNotEmpty())

                    @foreach ($product->options as $option)
                        <fieldset class="space-y-3" wire:key="product-option-selector-{{ $option->getKey() }}">
                            <legend class="text-sm font-medium text-zinc-950 dark:text-white">{{ $option->name }}</legend>

                                @foreach ($option->values as $value)
                                    @php($selected = ($selectedOptions[$option->name] ?? null) === $value->value)
                                    <button
                                        type="button"
                                        wire:click="selectOption(@js($option->name), @js($value->value))"
                                        @class([
                                            'min-h-10 rounded-md border px-4 py-2 text-sm font-medium transition',
                                            'border-blue-700 bg-blue-50 text-blue-800 dark:border-blue-300 dark:bg-blue-950 dark:text-blue-100' => $selected,
                                            'border-zinc-200 text-zinc-700 hover:border-zinc-400 dark:border-zinc-700 dark:text-zinc-200 dark:hover:border-zinc-500' => ! $selected,
                                        ])
                                        aria-pressed="{{ $selected ? 'true' : 'false' }}"
                                    >
                                        {{ $value->value }}
                                    </button>
                                @endforeach

                        </fieldset>
                    @endforeach

            @endif

{{ $stockState['message'] }}

                    <button type="button" wire:click="decreaseQuantity" class="flex size-11 items-center justify-center border-r border-zinc-200 text-lg dark:border-zinc-700" aria-label="Decrease quantity">-</button>
                    <input wire:model.live="quantity" type="number" min="1" class="h-11 w-full border-0 bg-transparent text-center text-sm" aria-label="Quantity">
                    <button type="button" wire:click="increaseQuantity" class="flex size-11 items-center justify-center border-l border-zinc-200 text-lg dark:border-zinc-700" aria-label="Increase quantity">+</button>

                <flux:button wire:click="addToCart" variant="primary" class="w-full" :disabled="! $this->canAddToCart()">
                    {{ $this->canAddToCart() ? 'Add to cart' : 'Sold out' }}
                </flux:button>

            @if ($product->description_html)

                    {!! $product->description_html !!}

            @endif

Vendor

{{ $product->vendor ?: '-' }}

Product type

{{ $product->product_type ?: '-' }}

                @if ($selectedVariant)

SKU

{{ $selectedVariant->sku ?: '-' }}

Shipping

{{ $selectedVariant->requires_shipping ? 'Required' : 'Digital delivery' }}

                @endif


Output:
Chunk ID: c5acfe
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 2136
Output:
<?php

namespace App\Livewire\Storefront\Products;

use App\Enums\InventoryPolicy;
use App\Models\Customer;
use App\Models\Product;
use App\Models\ProductOptionValue;
use App\Models\ProductVariant;
use App\Models\Store;
use App\Services\CartService;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;

class Show extends Component
{
    public string $handle;

    public int $storeId;

    /**
     * @var array<string, string>
     */
    public array $selectedOptions = [];

    public int $quantity = 1;

    public function mount(string $handle): void
    {
        $this->handle = $handle;
        $this->storeId = $this->store()->getKey();

        $variant = $this->product()->variants->firstWhere('is_default', true)
            ?? $this->product()->variants->first();

        if ($variant instanceof ProductVariant) {
            $this->selectedOptions = $variant->optionValues
                ->mapWithKeys(fn (ProductOptionValue $value): array => [$value->option->name => $value->value])
                ->all();
        }
    }

    public function selectOption(string $optionName, string $value): void
    {
        $this->selectedOptions[$optionName] = $value;
        $this->quantity = 1;
    }

    public function increaseQuantity(): void
    {
        $variant = $this->selectedVariant();
        $max = $variant?->inventoryItem?->policy === InventoryPolicy::Deny
            ? max(1, $variant->inventoryItem->availableQuantity())
            : null;

        if ($max === null || $this->quantity < $max) {
            $this->quantity++;
        }
    }

    public function decreaseQuantity(): void
    {
        $this->quantity = max(1, $this->quantity - 1);
    }

    public function addToCart(): void
    {
        $store = $this->store();
        $variant = $this->selectedVariant();

        if (! $variant instanceof ProductVariant || ! $this->canAddToCart()) {
            return;
        }

        $customer = Auth::guard('customer')->user();
        $customer = $customer instanceof Customer ? $customer : null;

        app(CartService::class)->addLine(
            app(CartService::class)->getOrCreateForSession($store, $customer),
            $variant->getKey(),
            $this->quantity,
        );

        $this->dispatch('cart-updated');
        $this->dispatch('toast', type: 'success', message: __('Added to cart'));
    }

    public function store(): Store
    {
        if (isset($this->storeId)) {
            $store = Store::query()->findOrFail($this->storeId);
            app()->instance('current_store', $store);

            return $store;
        }

        $store = app('current_store');

        abort_unless($store instanceof Store, 404);

        return $store;
    }

    public function product(): Product
    {
        $this->store();

        return Product::query()
            ->with(['options.values', 'variants.inventoryItem', 'variants.optionValues.option', 'collections'])
            ->where('handle', $this->handle)
            ->where('status', 'active')
            ->whereNotNull('published_at')
            ->firstOrFail();
    }

    public function selectedVariant(): ?ProductVariant
    {
        $product = $this->product();

        if ($product->options->isEmpty()) {
            return $product->variants->first();
        }

        return $product->variants->first(function (ProductVariant $variant): bool {
            $options = $variant->optionValues
                ->mapWithKeys(fn (ProductOptionValue $value): array => [$value->option->name => $value->value])
                ->all();

            return $options === $this->selectedOptions;
        });
    }

    public function canAddToCart(): bool
    {
        $variant = $this->selectedVariant();

        if (! $variant instanceof ProductVariant || ! $variant->isPurchasable()) {
            return false;
        }

        $inventory = $variant->inventoryItem;

        return $inventory?->policy === InventoryPolicy::Continue
            || ($inventory?->availableQuantity() ?? 0) >= $this->quantity;
    }

    /**
     * @return array{message: string, class: string}
     */
    public function stockState(): array
    {
        $variant = $this->selectedVariant();
        $inventory = $variant?->inventoryItem;

        if (! $inventory) {
            return ['message' => 'Unavailable', 'class' => 'text-red-700 dark:text-red-300'];
        }

        if ($inventory->policy === InventoryPolicy::Continue && $inventory->availableQuantity() <= 0) {
            return ['message' => 'Available on backorder', 'class' => 'text-blue-700 dark:text-blue-300'];
        }

        if ($inventory->availableQuantity() <= 0) {
            return ['message' => 'Out of stock', 'class' => 'text-red-700 dark:text-red-300'];
        }

        if ($inventory->availableQuantity() <= 10) {
            return ['message' => "Only {$inventory->availableQuantity()} left in stock", 'class' => 'text-amber-700 dark:text-amber-300'];
        }

        return ['message' => 'In stock', 'class' => 'text-green-700 dark:text-green-300'];
    }

    public function render(): mixed
    {
        $product = $this->product();

        return view('livewire.storefront.products.show', [
            'product' => $product,
            'selectedVariant' => $this->selectedVariant(),
            'stockState' => $this->stockState(),
        ])->layout('layouts.storefront', [
            'title' => $product->title,
        ]);
    }
}
<?php

namespace App\Livewire\Storefront\Search;

use App\Models\Product;
use App\Models\Store;
use App\Services\SearchService;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Livewire\Component;
use Livewire\WithPagination;

class Index extends Component
{
    use WithPagination;

    public string $q = '';

    public string $sort = 'relevance';

    public bool $inStock = false;

    public ?int $minPrice = null;

    public ?int $maxPrice = null;

    /**
     * @var array<int, string>
     */
    public array $types = [];

    /**
     * @var array<int, string>
     */
    public array $vendors = [];

    public function mount(): void
    {
        $this->q = (string) request('q', '');
    }

    public function updated(): void
    {
        $this->resetPage();
    }

    public function clearFilters(): void
    {
        $this->sort = 'relevance';
        $this->inStock = false;
        $this->minPrice = null;
        $this->maxPrice = null;
        $this->types = [];
        $this->vendors = [];
        $this->resetPage();
    }

    public function products(): LengthAwarePaginator
    {
        return app(SearchService::class)->search(
            $this->store(),
            $this->q,
            $this->filters(),
            12,
            $this->sort,
        );
    }

    public function productTypes(): Collection
    {
        return Product::withoutGlobalScopes()
            ->where('store_id', $this->store()->getKey())
            ->where('status', 'active')
            ->whereNotNull('published_at')
            ->whereNotNull('product_type')
            ->distinct()
            ->orderBy('product_type')
            ->pluck('product_type');
    }

    public function productVendors(): Collection
    {
        return Product::withoutGlobalScopes()
            ->where('store_id', $this->store()->getKey())
            ->where('status', 'active')
            ->whereNotNull('published_at')
            ->whereNotNull('vendor')
            ->distinct()
            ->orderBy('vendor')
            ->pluck('vendor');
    }

    public function render(): mixed
    {
        return view('livewire.storefront.search.index', [
            'products' => $this->products(),
            'productTypes' => $this->productTypes(),
            'productVendors' => $this->productVendors(),
        ])->layout('layouts.storefront', [
            'title' => __('Search results'),
        ]);
    }

    /**
     * @return array<string, mixed>
     */
    private function filters(): array
    {
        return [
            'in_stock' => $this->inStock,
            'price_min' => $this->minPrice === null ? null : $this->minPrice * 100,
            'price_max' => $this->maxPrice === null ? null : $this->maxPrice * 100,
            'product_type' => $this->types,
            'vendor' => $this->vendors,
        ];
    }

    private function store(): Store
    {
        $store = app('current_store');

        abort_unless($store instanceof Store, 404);

        return $store;
    }
}


sed -n '1,180p' resources/views/livewire/storefront/search/index.blade.php && sed -n '1,160p' resources/views/components/storefront/product-card.blade.php


sed -n '1,180p' resources/views/layouts/storefront.blade.php && sed -n '1,120p' resources/views/livewire/storefront/pages/show.blade.php


sed -n '250,310p' database/seeders/ProductSeeder.php && sed -n '1,110p' database/seeders/NavigationItemSeeder.php && sed -n '1,80p' database/seeders/PageSeeder.php


sed -n '1,180p' resources/views/livewire/storefront/search/index.blade.php && sed -n '1,160p' resources/views/components/storefront/product-card.blade.php

product-card.blade.php

    <x-storefront.breadcrumbs :items="[['label' => 'Search results']]" />

            @if (trim($q) !== '')
                {{ $products->total() }} results for "{{ $q }}"
            @else
                Search products
            @endif

        <flux:input wire:model.live.debounce.300ms="q" icon="magnifying-glass" placeholder="Search products..." aria-label="Search products" />

Filters

                <button wire:click="clearFilters" class="text-sm font-medium text-blue-700 hover:underline dark:text-blue-300">Clear all</button>

                <flux:checkbox wire:model.live="inStock" label="In stock" />

Price

                        <flux:input wire:model.live.debounce.500ms="minPrice" type="number" min="0" placeholder="Min" aria-label="Minimum price" />
                        <flux:input wire:model.live.debounce.500ms="maxPrice" type="number" min="0" placeholder="Max" aria-label="Maximum price" />

Product type

                        @foreach ($productTypes as $type)
                            <flux:checkbox wire:model.live="types" value="{{ $type }}" :label="$type" wire:key="search-type-filter-{{ $type }}" />
                        @endforeach

Vendor

                        @foreach ($productVendors as $vendor)
                            <flux:checkbox wire:model.live="vendors" value="{{ $vendor }}" :label="$vendor" wire:key="search-vendor-filter-{{ $vendor }}" />
                        @endforeach

{{ $products->total() }} products

                <flux:select wire:model.live="sort" aria-label="Sort products" class="sm:max-w-56">
                    <flux:select.option value="relevance">Relevance</flux:select.option>
                    <flux:select.option value="price_asc">Price: Low to High</flux:select.option>
                    <flux:select.option value="price_desc">Price: High to Low</flux:select.option>
                    <flux:select.option value="newest">Newest</flux:select.option>
                </flux:select>

            @if ($products->isEmpty())

                        <flux:icon name="magnifying-glass" class="size-10 text-zinc-400" />

No products found

Try another search term or adjust your filters.

                        <flux:button wire:click="clearFilters" variant="ghost">Clear filters</flux:button>

            @else

                    @foreach ($products as $product)
                        <x-storefront.product-card :product="$product" wire:key="search-product-{{ $product->getKey() }}" />
                    @endforeach

                {{ $products->links() }}
            @endif

@props(['product'])

@php
    $variant = $product->variants->first();
    $isSoldOut = $product->variants->isNotEmpty()
        && $product->variants->every(fn ($variant) => $variant->inventoryItem?->policy?->value === 'deny' && $variant->inventoryItem?->availableQuantity() <= 0);
    $isOnSale = $variant?->compare_at_amount && $variant->compare_at_amount > $variant->price_amount;
@endphp

class('group') }}>
    handle) }}" class="block space-y-3" wire:navigate>

                @if ($isOnSale)
                    Sale
                @endif

                @if ($isSoldOut)
                    Sold out
                @endif

                <flux:icon name="shopping-bag" class="size-12" />

{{ $product->title }}

            @if ($variant)
                <x-storefront.price :amount="$variant->price_amount" :compare-at="$variant->compare_at_amount" :currency="$variant->currency" class="text-sm" />
            @endif

                {{ $product->variants_count ?? $product->variants->count() }} {{ Str::plural('variant', $product->variants_count ?? $product->variants->count()) }}


sed -n '1,180p' resources/views/layouts/storefront.blade.php && sed -n '1,120p' resources/views/livewire/storefront/pages/show.blade.php

show.blade.php

<!DOCTYPE html>
getLocale()) }}">

        @include('partials.head')

        @php($store = app()->bound('current_store') ? app('current_store') : null)
        @php($announcement = data_get($themeSettings ?? [], 'announcement', []))
        @php($mainLinks = ($mainNavigation ?? []) !== [] ? $mainNavigation : [['label' => 'Collections', 'url' => route('collections.index'), 'external' => false], ['label' => 'Search', 'url' => route('search.index'), 'external' => false]])
        @php($footerLinks = ($footerNavigation ?? []) !== [] ? $footerNavigation : [['label' => 'Collections', 'url' => route('collections.index'), 'external' => false], ['label' => 'Search', 'url' => route('search.index'), 'external' => false]])

            Skip to main content

        @if (data_get($announcement, 'enabled', false))

                @if (data_get($announcement, 'url'))

                        {{ data_get($announcement, 'text') }}

                @else
                    {{ data_get($announcement, 'text') }}
                @endif

        @endif

         data_get($themeSettings ?? [], 'header.sticky', true),
        ])>

                    {{ $store?->name ?? config('app.name') }}

                    @foreach ($mainLinks as $item)
                        @if (($item['children'] ?? []) !== [])

                                    {{ $item['label'] }}
                                    <flux:icon name="chevron-down" class="size-4" />

                                    @foreach ($item['children'] as $child)

                                            {{ $child['label'] }}

                                    @endforeach

                        @else

                                {{ $item['label'] }}

                        @endif
                    @endforeach

                    <flux:button :href="route('search.index')" wire:navigate variant="subtle" icon="magnifying-glass" aria-label="Search" />
                    <flux:button :href="route('account.dashboard')" wire:navigate variant="subtle" icon="user" aria-label="Account" />
                    <flux:modal.trigger name="cart-drawer">
                        <flux:button variant="subtle" icon="shopping-bag" aria-label="Cart" />
                    </flux:modal.trigger>

        <livewire:storefront.cart-drawer />

            {{ $slot }}

{{ $store?->name ?? config('app.name') }}

{{ data_get($themeSettings ?? [], 'footer.tagline') }}

Shop

                        @foreach ($footerLinks as $item)

                                {{ $item['label'] }}

                            @foreach (($item['children'] ?? []) as $child)

                                    {{ $child['label'] }}

                            @endforeach
                        @endforeach

Customer

                        Account
                        About

        @fluxScripts

    <x-storefront.breadcrumbs :items="[['label' => $title]]" />

{{ $title }}

            {!! $bodyHtml !!}


sed -n '250,310p' database/seeders/ProductSeeder.php && sed -n '1,110p' database/seeders/NavigationItemSeeder.php && sed -n '1,80p' database/seeders/PageSeeder.php

PageSeeder.php

'Natural' => 'NAT',
            'Grey' => 'GRY',
            'Camel' => 'CAM',
            'Charcoal' => 'CHA',
            'Silver' => 'SLV',
            'Red' => 'RED',
            '25 EUR' => '25',
            '50 EUR' => '50',
            '100 EUR' => '100',
            '256GB' => '256',
            '512GB' => '512',
            '1TB' => '1TB',
            'S/M' => 'SM',
            'L/XL' => 'LXL',
        ][$value] ?? Str::upper(Str::slug($value, ''));
    }

    /**
     * @return array<int, array<string, mixed>>
     */
    private function fashionProducts(): array
    {
        return [
            $this->product('Classic Cotton T-Shirt', 'classic-cotton-t-shirt', 'Acme Basics', 'T-Shirts', ['new', 'popular'], ['new-arrivals', 't-shirts'], '
A timeless classic cotton t-shirt. Comfortable, breathable, and perfect for everyday wear.
', [['Size' => ['S', 'M', 'L', 'XL']], ['Color' => ['White', 'Black', 'Navy']]], ['price_amount' => 2499, 'weight_g' => 200, 'quantity_on_hand' => 15], 'ACME-CTSH'),
            $this->product('Premium Slim Fit Jeans', 'premium-slim-fit-jeans', 'Acme Denim', 'Pants', ['new', 'sale'], ['new-arrivals', 'pants-jeans', 'sale'], '
Slim fit jeans crafted from premium stretch denim. Comfortable all-day wear with a modern silhouette.
', [['Size' => ['28', '30', '32', '34', '36']], ['Color' => ['Blue', 'Black']]], ['price_amount' => 7999, 'compare_at_amount' => 9999, 'weight_g' => 800, 'quantity_on_hand' => 8], 'ACME-JNS'),
            $this->product('Organic Hoodie', 'organic-hoodie', 'Acme Basics', 'Hoodies', ['new', 'trending'], ['new-arrivals'], '
Made from 100% organic cotton. Warm, soft, and sustainably produced.
', [['Size' => ['S', 'M', 'L', 'XL']]], ['price_amount' => 5999, 'weight_g' => 500, 'quantity_on_hand' => 20], 'ACME-HOOD'),
            $this->product('Leather Belt', 'leather-belt', 'Acme Accessories', 'Accessories', ['popular'], [], '
Genuine leather belt with brushed metal buckle. A wardrobe essential.
', [['Size' => ['S/M', 'L/XL']], ['Color' => ['Brown', 'Black']]], ['price_amount' => 3499, 'weight_g' => 150, 'quantity_on_hand' => 25], 'ACME-BELT'),
            $this->product('Running Sneakers', 'running-sneakers', 'Acme Sport', 'Shoes', ['trending'], ['new-arrivals'], '
Lightweight running sneakers with responsive cushioning and breathable mesh upper.
', [['Size' => ['EU 38', 'EU 39', 'EU 40', 'EU 41', 'EU 42', 'EU 43', 'EU 44']], ['Color' => ['White', 'Black']]], ['price_amount' => 11999, 'weight_g' => 600, 'quantity_on_hand' => 5], 'ACME-RUN'),
            $this->product('Graphic Print Tee', 'graphic-print-tee', 'Acme Basics', 'T-Shirts', ['new'], ['t-shirts'], '
Bold graphic print on soft cotton. Express yourself with this statement piece.
', [['Size' => ['S', 'M', 'L', 'XL']]], ['price_amount' => 2999, 'weight_g' => 210, 'quantity_on_hand' => 18], 'ACME-GTEE'),
            $this->product('V-Neck Linen Tee', 'v-neck-linen-tee', 'Acme Basics', 'T-Shirts', ['popular'], ['t-shirts'], '
Lightweight linen blend v-neck. Perfect for warm summer days.
', [['Size' => ['S', 'M', 'L']], ['Color' => ['Beige', 'Olive', 'Sky Blue']]], ['price_amount' => 3499, 'weight_g' => 180, 'quantity_on_hand' => 12], 'ACME-VNECK'),
            $this->product('Striped Polo Shirt', 'striped-polo-shirt', 'Acme Basics', 'T-Shirts', ['sale'], ['t-shirts', 'sale'], '
Classic striped polo with a modern relaxed fit. Knitted collar and two-button placket.
', [['Size' => ['S', 'M', 'L', 'XL']]], ['price_amount' => 2799, 'compare_at_amount' => 3999, 'weight_g' => 250, 'quantity_on_hand' => 10], 'ACME-POLO'),
            $this->product('Cargo Pants', 'cargo-pants', 'Acme Workwear', 'Pants', ['popular'], ['pants-jeans'], '
Utility cargo pants with multiple pockets. Durable cotton twill construction.
', [['Size' => ['30', '32', '34', '36']], ['Color' => ['Khaki', 'Olive', 'Black']]], ['price_amount' => 5499, 'weight_g' => 700, 'quantity_on_hand' => 14], 'ACME-CARGO'),
            $this->product('Chino Shorts', 'chino-shorts', 'Acme Basics', 'Pants', ['new', 'trending'], ['pants-jeans', 'new-arrivals'], '
Tailored chino shorts. Comfortable stretch fabric with a clean silhouette.
', [['Size' => ['30', '32', '34', '36']], ['Color' => ['Navy', 'Sand']]], ['price_amount' => 3999, 'weight_g' => 350, 'quantity_on_hand' => 16], 'ACME-CHINO'),
            $this->product('Wide Leg Trousers', 'wide-leg-trousers', 'Acme Denim', 'Pants', ['sale'], ['pants-jeans', 'sale'], '
Relaxed wide leg trousers with a high waist. Flowing drape in premium woven fabric.
', [['Size' => ['S', 'M', 'L']]], ['price_amount' => 4999, 'compare_at_amount' => 6999, 'weight_g' => 550, 'quantity_on_hand' => 7], 'ACME-WIDE'),
            $this->product('Wool Scarf', 'wool-scarf', 'Acme Accessories', 'Accessories', ['popular'], [], '
Warm merino wool scarf. Soft hand feel, naturally breathable and temperature regulating.
', [['Color' => ['Grey', 'Burgundy', 'Navy']…5739 chars truncated… createItems(NavigationMenu $menu, array $items, ?int $parentId = null): void
    {
        foreach ($items as $position => $item) {
            $navigationItem = NavigationItem::withoutGlobalScopes()->create([
                'menu_id' => $menu->getKey(),
                'parent_id' => $parentId,
                'type' => $item['type'],
                'label' => $item['label'],
                'url' => $item['url'] ?? null,
                'resource_id' => $item['resource_id'] ?? null,
                'position' => $position,
            ]);

            if (($item['children'] ?? []) !== []) {
                $this->createItems($menu, array_values($item['children']), $navigationItem->getKey());
            }
        }
    }

    /**
     * @return array<int, array<string, mixed>>
     */
    private function mainMenuItems(Store $store): array
    {
        $newArrivals = $this->collection($store, 'new-arrivals') ?? $this->collection($store, 'featured');
        $secondaryCollection = $this->collection($store, 't-shirts') ?? $this->collection($store, 'accessories');
        $tertiaryCollection = $this->collection($store, 'pants-jeans');
        $sale = $this->collection($store, 'sale');
        $about = $this->page($store, 'about');

        return array_values(array_filter([
            ['label' => 'Home', 'type' => 'link', 'url' => '/'],
            [
                'label' => 'Shop',
                'type' => 'link',
                'url' => '/collections',
                'children' => array_values(array_filter([
                    $newArrivals ? ['label' => $newArrivals->title, 'type' => 'collection', 'resource_id' => $newArrivals->getKey()] : null,
                    $secondaryCollection ? ['label' => $secondaryCollection->title, 'type' => 'collection', 'resource_id' => $secondaryCollection->getKey()] : null,
                    $tertiaryCollection ? ['label' => $tertiaryCollection->title, 'type' => 'collection', 'resource_id' => $tertiaryCollection->getKey()] : null,
                    $sale ? ['label' => 'Sale', 'type' => 'collection', 'resource_id' => $sale->getKey()] : null,
                ])),
            ],
            ['label' => 'Search', 'type' => 'link', 'url' => '/search'],
            $about ? ['label' => 'About', 'type' => 'page', 'resource_id' => $about->getKey()] : null,
        ]));
    }

    /**
     * @return array<int, array<string, mixed>>
     */
    private function footerMenuItems(Store $store): array
    {
        $sale = $this->collection($store, 'sale');
        $about = $this->page($store, 'about');
        $faq = $this->page($store, 'faq');

        return array_values(array_filter([
            $sale ? ['label' => 'Sale', 'type' => 'collection', 'resource_id' => $sale->getKey()] : null,
            $about ? ['label' => 'About', 'type' => 'page', 'resource_id' => $about->getKey()] : null,
            $faq ? ['label' => 'FAQ', 'type' => 'page', 'resource_id' => $faq->getKey()] : null,
            ['label' => 'Account', 'type' => 'link', 'url' => '/account'],
<?php

namespace Database\Seeders;

use App\Models\Page;
use App\Models\Store;
use Illuminate\Database\Seeder;

class PageSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        Store::query()->get()->each(function (Store $store): void {
            foreach ($this->pagesFor($store) as $page) {
                Page::withoutGlobalScopes()->updateOrCreate(
                    [
                        'store_id' => $store->getKey(),
                        'handle' => $page['handle'],
                    ],
                    [
                        'title' => $page['title'],
                        'body_html' => $page['body_html'],
                        'status' => 'published',
                        'published_at' => now(),
                    ],
                );
            }
        });
    }

    /**
     * @return array<int, array{handle: string, title: string, body_html: string}>
     */
    private function pagesFor(Store $store): array
    {
        return [
            [
                'handle' => 'about',
                'title' => 'About',
                'body_html' => "
{$store->name} is the demo storefront for this self-contained shop platform.

The catalog includes multi-variant products, sale pricing, inventory rules, backorder handling, and digital product examples for checkout and storefront testing.
",
            ],
            [
                'handle' => 'faq',
                'title' => 'FAQ',
                'body_html' => '
Shipping, payment, returns, and account flows are implemented progressively according to the project roadmap.
',
            ],
            [
                'handle' => 'shipping',
                'title' => 'Shipping',
                'body_html' => '
Shipping zones, rates, and tax-aware checkout calculations are seeded in the checkout phase.
',
            ],
        ];
    }
}


Output:
Chunk ID: 13172a
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1633
Output:

    <x-storefront.breadcrumbs :items="[['label' => 'Search results']]" />

            @if (trim($q) !== '')
                {{ $products->total() }} results for "{{ $q }}"
            @else
                Search products
            @endif

        <flux:input wire:model.live.debounce.300ms="q" icon="magnifying-glass" placeholder="Search products..." aria-label="Search products" />

Filters

                <button wire:click="clearFilters" class="text-sm font-medium text-blue-700 hover:underline dark:text-blue-300">Clear all</button>

                <flux:checkbox wire:model.live="inStock" label="In stock" />

Price

                        <flux:input wire:model.live.debounce.500ms="minPrice" type="number" min="0" placeholder="Min" aria-label="Minimum price" />
                        <flux:input wire:model.live.debounce.500ms="maxPrice" type="number" min="0" placeholder="Max" aria-label="Maximum price" />

Product type

                        @foreach ($productTypes as $type)
                            <flux:checkbox wire:model.live="types" value="{{ $type }}" :label="$type" wire:key="search-type-filter-{{ $type }}" />
                        @endforeach

Vendor

                        @foreach ($productVendors as $vendor)
                            <flux:checkbox wire:model.live="vendors" value="{{ $vendor }}" :label="$vendor" wire:key="search-vendor-filter-{{ $vendor }}" />
                        @endforeach

{{ $products->total() }} products

                <flux:select wire:model.live="sort" aria-label="Sort products" class="sm:max-w-56">
                    <flux:select.option value="relevance">Relevance</flux:select.option>
                    <flux:select.option value="price_asc">Price: Low to High</flux:select.option>
                    <flux:select.option value="price_desc">Price: High to Low</flux:select.option>
                    <flux:select.option value="newest">Newest</flux:select.option>
                </flux:select>

            @if ($products->isEmpty())

                        <flux:icon name="magnifying-glass" class="size-10 text-zinc-400" />

No products found

Try another search term or adjust your filters.

                        <flux:button wire:click="clearFilters" variant="ghost">Clear filters</flux:button>

            @else

                    @foreach ($products as $product)
                        <x-storefront.product-card :product="$product" wire:key="search-product-{{ $product->getKey() }}" />
                    @endforeach

                {{ $products->links() }}
            @endif

@props(['product'])

@php
    $variant = $product->variants->first();
    $isSoldOut = $product->variants->isNotEmpty()
        && $product->variants->every(fn ($variant) => $variant->inventoryItem?->policy?->value === 'deny' && $variant->inventoryItem?->availableQuantity() <= 0);
    $isOnSale = $variant?->compare_at_amount && $variant->compare_at_amount > $variant->price_amount;
@endphp

class('group') }}>
    handle) }}" class="block space-y-3" wire:navigate>

                @if ($isOnSale)
                    Sale
                @endif

                @if ($isSoldOut)
                    Sold out
                @endif

                <flux:icon name="shopping-bag" class="size-12" />

{{ $product->title }}

            @if ($variant)
                <x-storefront.price :amount="$variant->price_amount" :compare-at="$variant->compare_at_amount" :currency="$variant->currency" class="text-sm" />
            @endif

                {{ $product->variants_count ?? $product->variants->count() }} {{ Str::plural('variant', $product->variants_count ?? $product->variants->count()) }}


Output:
Chunk ID: 5bc739
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1854
Output:
<!DOCTYPE html>
getLocale()) }}">

        @include('partials.head')

        @php($store = app()->bound('current_store') ? app('current_store') : null)
        @php($announcement = data_get($themeSettings ?? [], 'announcement', []))
        @php($mainLinks = ($mainNavigation ?? []) !== [] ? $mainNavigation : [['label' => 'Collections', 'url' => route('collections.index'), 'external' => false], ['label' => 'Search', 'url' => route('search.index'), 'external' => false]])
        @php($footerLinks = ($footerNavigation ?? []) !== [] ? $footerNavigation : [['label' => 'Collections', 'url' => route('collections.index'), 'external' => false], ['label' => 'Search', 'url' => route('search.index'), 'external' => false]])

            Skip to main content

        @if (data_get($announcement, 'enabled', false))

                @if (data_get($announcement, 'url'))

                        {{ data_get($announcement, 'text') }}

                @else
                    {{ data_get($announcement, 'text') }}
                @endif

        @endif

         data_get($themeSettings ?? [], 'header.sticky', true),
        ])>

                    {{ $store?->name ?? config('app.name') }}

                    @foreach ($mainLinks as $item)
                        @if (($item['children'] ?? []) !== [])

                                    {{ $item['label'] }}
                                    <flux:icon name="chevron-down" class="size-4" />

                                    @foreach ($item['children'] as $child)

                                            {{ $child['label'] }}

                                    @endforeach

                        @else

                                {{ $item['label'] }}

                        @endif
                    @endforeach

                    <flux:button :href="route('search.index')" wire:navigate variant="subtle" icon="magnifying-glass" aria-label="Search" />
                    <flux:button :href="route('account.dashboard')" wire:navigate variant="subtle" icon="user" aria-label="Account" />
                    <flux:modal.trigger name="cart-drawer">
                        <flux:button variant="subtle" icon="shopping-bag" aria-label="Cart" />
                    </flux:modal.trigger>

        <livewire:storefront.cart-drawer />

            {{ $slot }}

{{ $store?->name ?? config('app.name') }}

{{ data_get($themeSettings ?? [], 'footer.tagline') }}

Shop

                        @foreach ($footerLinks as $item)

                                {{ $item['label'] }}

                            @foreach (($item['children'] ?? []) as $child)

                                    {{ $child['label'] }}

                            @endforeach
                        @endforeach

Customer

                        Account
                        About

        @fluxScripts

    <x-storefront.breadcrumbs :items="[['label' => $title]]" />

{{ $title }}

            {!! $bodyHtml !!}