output:
Chunk ID: 88b39a
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1885
Output:
<?php

namespace App\Livewire\Admin\Settings;

use App\Enums\StoreDomainType;
use App\Models\Store;
use App\Models\StoreDomain;
use App\Models\StoreSettings;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Support\Collection;
use Illuminate\Validation\Rule;
use Livewire\Attributes\Locked;
use Livewire\Component;

class Index extends Component
{
    use AuthorizesRequests;

    #[Locked]
    public int $storeId;

    public string $storeName = '';

    public string $storeHandle = '';

    public string $defaultCurrency = 'EUR';

    public string $defaultLocale = 'en';

    public string $timezone = 'UTC';

    public bool $announcementEnabled = false;

    public string $announcementText = '';

    public bool $guestCheckoutEnabled = true;

    public string $newHostname = '';

    public string $newType = 'storefront';

    public function mount(): void
    {
        $store = $this->store();

        $this->authorize('update', $store);

        $settings = $this->storeSettings($store)->settings_json ?? [];

        $this->storeId = $store->getKey();
        $this->storeName = $store->name;
        $this->storeHandle = $store->handle;
        $this->defaultCurrency = $store->default_currency;
        $this->defaultLocale = $store->default_locale;
        $this->timezone = $store->timezone;
        $this->announcementEnabled = (bool) data_get($settings, 'announcement.enabled', false);
        $this->announcementText = (string) data_get($settings, 'announcement.text', '');
        $this->guestCheckoutEnabled = (bool) data_get($settings, 'checkout.guest_checkout_enabled', true);
    }

    public function save(): void
    {
        $store = $this->scopedStore();

        $this->authorize('update', $store);

        $validated = $this->validate([
            'storeName' => ['required', 'string', 'max:255'],
            'defaultCurrency' => ['required', Rule::in($this->currencyOptions())],
            'defaultLocale' => ['required', Rule::in(array_keys($this->localeOptions()))],
            'timezone' => ['required', Rule::in(timezone_identifiers_list())],
            'announcementEnabled' => ['boolean'],
            'announcementText' => ['nullable', 'string', 'max:255'],
            'guestCheckoutEnabled' => ['boolean'],
        ]);

        $store->forceFill([
            'name' => $validated['storeName'],
            'default_currency' => $validated['defaultCurrency'],
            'default_locale' => $validated['defaultLocale'],
            'timezone' => $validated['timezone'],
        ])->save();

        $settings = $this->storeSettings($store);
        $settings->forceFill([
            'settings_json' => array_replace_recursive($settings->settings_json ?? [], [
                'announcement' => [
                    'enabled' => $this->announcementEnabled,
                    'text' => $this->announcementText,
                ],
                'checkout' => [
                    'guest_checkout_enabled' => $this->guestCheckoutEnabled,
                ],
            ]),
            'updated_at' => now(),
        ])->save();

        session()->flash('status', 'Settings saved');
        $this->dispatch('toast', type: 'success', message: __('Settings saved'));
    }

    public function addDomain(): void
    {
        $store = $this->scopedStore();

        $this->authorize('update', $store);

        $validated = $this->validate([
            'newHostname' => [
                'required',
                'string',
                'max:255',
                'regex:/^[a-z0-9.-]+$/i',
                Rule::unique('store_domains', 'hostname'),
            ],
            'newType' => ['required', Rule::in(array_column(StoreDomainType::cases(), 'value'))],
        ], [], [
            'newHostname' => 'hostname',
            'newType' => 'domain type',
        ]);

        StoreDomain::query()->create([
            'store_id' => $store->getKey(),
            'hostname' => mb_strtolower(trim($validated['newHostname'])),
            'type' => StoreDomainType::from($validated['newType']),
            'is_primary' => $this->domains()->isEmpty(),
            'tls_mode' => 'managed',
        ]);

        $this->reset('newHostname');

        session()->flash('status', 'Domain added');
        $this->dispatch('toast', type: 'success', message: __('Domain added'));
    }

    public function setPrimary(int $domainId): void
    {
        $store = $this->scopedStore();

        $this->authorize('update', $store);

        $domain = $this->domain($domainId);

        StoreDomain::query()
            ->where('store_id', $store->getKey())
            ->update(['is_primary' => false]);

        $domain->forceFill(['is_primary' => true])->save();

        session()->flash('status', 'Primary domain updated');
    }

    public function removeDomain(int $domainId): void
    {
        $store = $this->scopedStore();

        $this->authorize('update', $store);

        $domain = $this->domain($domainId);
        $wasPrimary = $domain->is_primary;

        $domain->delete();

        if ($wasPrimary) {
            StoreDomain::query()
                ->where('store_id', $store->getKey())
                ->orderBy('id')
                ->first()
                ?->forceFill(['is_primary' => true])
                ->save();
        }

        session()->flash('status', 'Domain removed');
    }

    /**
     * @return Collection<int, StoreDomain>
     */
    public function domains(): Collection
    {
        return StoreDomain::query()
            ->where('store_id', $this->storeId)
            ->orderByDesc('is_primary')
            ->orderBy('hostname')
            ->get();
    }

    /**
     * @return array<string, string>
     */
    public function localeOptions(): array
    {
        return [
            'en' => 'English',
            'de' => 'German',
            'fr' => 'French',
        ];
    }

    /**
     * @return list<string>
     */
    public function currencyOptions(): array
    {
        return ['EUR', 'USD', 'GBP', 'CHF'];
    }

    /**
     * @return list<string>
     */
    public function timezoneOptions(): array
    {
        return collect(timezone_identifiers_list())
            ->filter(fn (string $timezone): bool => str_starts_with($timezone, 'Europe/') || str_starts_with($timezone, 'America/'))
            ->values()
            ->all();
    }

    public function render(): mixed
    {
        return view('livewire.admin.settings.index', [
            'domains' => $this->domains(),
            'currencyOptions' => $this->currencyOptions(),
            'localeOptions' => $this->localeOptions(),
            'timezoneOptions' => $this->timezoneOptions(),
        ])->layout('layouts.app', [
            'title' => __('Settings'),
        ]);
    }

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

        abort_unless($store instanceof Store, 404);

        return $store;
    }

    private function scopedStore(): Store
    {
        return Store::query()->whereKey($this->storeId)->firstOrFail();
    }

    private function storeSettings(Store $store): StoreSettings
    {
        return StoreSettings::query()->firstOrCreate(
            ['store_id' => $store->getKey()],
            ['settings_json' => []],
        );
    }

    private function domain(int $domainId): StoreDomain
    {
        return StoreDomain::query()
            ->where('store_id', $this->storeId)
            ->whereKey($domainId)
            ->firstOrFail();
    }
}


command:
/bin/zsh
-lc
sed -n '1,240p' routes/web.php

web.php

type: read

cmd: sed -n '1,240p' routes/web.php

aggregated_output:
<?php

use App\Http\Middleware\EnsureUserEmailIsVerified;
use App\Livewire\Admin\Analytics\Index as AdminAnalyticsIndex;
use App\Livewire\Admin\Apps\Index as AdminAppsIndex;
use App\Livewire\Admin\Apps\Show as AdminAppShow;
use App\Livewire\Admin\Auth\Login as AdminLogin;
use App\Livewire\Admin\Collections\Form as AdminCollectionForm;
use App\Livewire\Admin\Collections\Index as AdminCollectionsIndex;
use App\Livewire\Admin\Customers\Index as AdminCustomersIndex;
use App\Livewire\Admin\Customers\Show as AdminCustomerShow;
use App\Livewire\Admin\Dashboard as AdminDashboard;
use App\Livewire\Admin\Developers\Index as AdminDevelopersIndex;
use App\Livewire\Admin\Discounts\Form as AdminDiscountForm;
use App\Livewire\Admin\Discounts\Index as AdminDiscountsIndex;
use App\Livewire\Admin\Inventory\Index as AdminInventoryIndex;
use App\Livewire\Admin\Navigation\Index as AdminNavigationIndex;
use App\Livewire\Admin\Orders\Index as AdminOrdersIndex;
use App\Livewire\Admin\Orders\Show as AdminOrderShow;
use App\Livewire\Admin\Pages\Form as AdminPageForm;
use App\Livewire\Admin\Pages\Index as AdminPagesIndex;
use App\Livewire\Admin\Products\Form as AdminProductForm;
use App\Livewire\Admin\Products\Index as AdminProductsIndex;
use App\Livewire\Admin\Search\Settings as AdminSearchSettings;
use App\Livewire\Admin\Settings\Index as AdminSettingsIndex;
use App\Livewire\Admin\Settings\Shipping as AdminSettingsShipping;
use App\Livewire\Admin\Settings\Taxes as AdminSettingsTaxes;
use App\Livewire\Admin\Themes\Editor as AdminThemeEditor;
use App\Livewire\Admin\Themes\Index as AdminThemesIndex;
use App\Livewire\Storefront\Account\Auth\ForgotPassword as CustomerForgotPassword;
use App\Livewire\Storefront\Account\Auth\Login as CustomerLogin;
use App\Livewire\Storefront\Account\Auth\Register as CustomerRegister;
use App\Livewire\Storefront\Account\Auth\ResetPassword as CustomerResetPassword;
use App\Livewire\Storefront\Account\Orders\Index as CustomerOrdersIndex;
use App\Livewire\Storefront\Account\Orders\Show as CustomerOrderShow;
use App\Livewire\Storefront\Cart\Show as StorefrontCartShow;
use App\Livewire\Storefront\Checkout\Confirmation as StorefrontCheckoutConfirmation;
use App\Livewire\Storefront\Checkout\Show as StorefrontCheckoutShow;
use App\Livewire\Storefront\Collections\Index as StorefrontCollectionsIndex;
use App\Livewire\Storefront\Collections\Show as StorefrontCollectionShow;
use App\Livewire\Storefront\Home as StorefrontHome;
use App\Livewire\Storefront\Pages\Show as StorefrontPageShow;
use App\Livewire\Storefront\Products\Show as StorefrontProductShow;
use App\Livewire\Storefront\Search\Index as StorefrontSearchIndex;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;

Route::middleware(['storefront'])->group(function (): void {
    Route::livewire('/', StorefrontHome::class)->name('home');
    Route::livewire('collections', StorefrontCollectionsIndex::class)->name('collections.index');
    Route::livewire('collections/{handle}', StorefrontCollectionShow::class)->name('collections.show');
    Route::livewire('products/{handle}', StorefrontProductShow::class)->name('products.show');
    Route::livewire('cart', StorefrontCartShow::class)->name('cart.show');
    Route::livewire('checkout', StorefrontCheckoutShow::class)->name('checkout.show');
    Route::livewire('checkout/confirmation/{order}', StorefrontCheckoutConfirmation::class)->name('checkout.confirmation');
    Route::livewire('search', StorefrontSearchIndex::class)->name('search.index');
    Route::livewire('pages/{handle}', StorefrontPageShow::class)->name('pages.show');
});

Route::livewire('admin/login', AdminLogin::class)
    ->middleware('guest')
    ->name('admin.login');

Route::post('admin/logout', function () {
    Auth::guard('web')->logout();

    request()->session()->invalidate();
    request()->session()->regenerateToken();

    return redirect()->route('admin.login');
})->middleware('auth')->name('admin.logout');

Route::middleware(['auth', EnsureUserEmailIsVerified::class, 'admin'])->prefix('admin')->name('admin.')->group(function (): void {
    Route::livewire('/', AdminDashboard::class)->name('dashboard');
    Route::livewire('analytics', AdminAnalyticsIndex::class)->name('analytics.index');
    Route::livewire('apps', AdminAppsIndex::class)->name('apps.index');
    Route::livewire('apps/{installation}', AdminAppShow::class)->name('apps.show');
    Route::livewire('developers', AdminDevelopersIndex::class)->name('developers.index');
    Route::livewire('products', AdminProductsIndex::class)->name('products.index');
    Route::livewire('products/create', AdminProductForm::class)->name('products.create');
    Route::livewire('products/{product}/edit', AdminProductForm::class)->name('products.edit');
    Route::livewire('inventory', AdminInventoryIndex::class)->name('inventory.index');
    Route::livewire('orders', AdminOrdersIndex::class)->name('orders.index');
    Route::livewire('orders/{order}', AdminOrderShow::class)->name('orders.show');
    Route::livewire('customers', AdminCustomersIndex::class)->name('customers.index');
    Route::livewire('customers/{customer}', AdminCustomerShow::class)->name('customers.show');
    Route::livewire('discounts', AdminDiscountsIndex::class)->name('discounts.index');
    Route::livewire('discounts/create', AdminDiscountForm::class)->name('discounts.create');
    Route::livewire('discounts/{discount}/edit', AdminDiscountForm::class)->name('discounts.edit');
    Route::livewire('pages', AdminPagesIndex::class)->name('pages.index');
    Route::livewire('pages/create', AdminPageForm::class)->name('pages.create');
    Route::livewire('pages/{page}/edit', AdminPageForm::class)->name('pages.edit');
    Route::livewire('navigation', AdminNavigationIndex::class)->name('navigation.index');
    Route::livewire('themes', AdminThemesIndex::class)->name('themes.index');
    Route::livewire('themes/{theme}/editor', AdminThemeEditor::class)->name('themes.editor');
    Route::livewire('settings', AdminSettingsIndex::class)->name('settings.index');
    Route::livewire('settings/shipping', AdminSettingsShipping::class)->name('settings.shipping');
    Route::livewire('settings/taxes', AdminSettingsTaxes::class)->name('settings.taxes');
    Route::livewire('search/settings', AdminSearchSettings::class)->name('search.settings');
    Route::livewire('collections', AdminCollectionsIndex::class)->name('collections.index');
    Route::livewire('collections/create', AdminCollectionForm::class)->name('collections.create');
    Route::livewire('collections/{collection}/edit', AdminCollectionForm::class)->name('collections.edit');
});

Route::middleware(['storefront'])->group(function (): void {
    Route::livewire('account/login', CustomerLogin::class)
        ->middleware('guest:customer')
        ->name('account.login');

    Route::livewire('account/register', CustomerRegister::class)
        ->middleware('guest:customer')
        ->name('account.register');

    Route::livewire('account/forgot-password', CustomerForgotPassword::class)
        ->middleware('guest:customer')
        ->name('account.password.request');

    Route::livewire('account/reset-password/{token}', CustomerResetPassword::class)
        ->middleware('guest:customer')
        ->name('account.password.reset');

    Route::livewire('account', CustomerOrdersIndex::class)
        ->middleware('auth:customer')
        ->name('account.dashboard');

    Route::livewire('account/orders/{order}', CustomerOrderShow::class)
        ->middleware('auth:customer')
        ->name('account.orders.show');
});

Route::redirect('dashboard', 'admin')
    ->middleware(['auth', 'verified'])
    ->name('dashboard');

require __DIR__.'/settings.php';

status: completed


command: sed -n '1,340p' resources/views/livewire/admin/settings/index.blade.php

index.blade.php

aggregated_output:
            <flux:heading size="xl">Settings</flux:heading>
            <flux:text class="mt-1">Store defaults, checkout preferences, and domains.</flux:text>

            <flux:button :href="route('admin.settings.index')" wire:navigate variant="primary">General</flux:button>
            <flux:button :href="route('admin.settings.shipping')" wire:navigate variant="filled">Shipping</flux:button>
            <flux:button :href="route('admin.settings.taxes')" wire:navigate variant="filled">Taxes</flux:button>

    @if (session('status'))
        <flux:callout color="green" icon="check-circle">{{ session('status') }}</flux:callout>
    @endif

    <form wire:submit="save" class="space-y-6">

                    <flux:heading size="lg">Store details</flux:heading>
                    <flux:text class="mt-1">Basic storefront identity.</flux:text>

                    <flux:input wire:model="storeName" label="Store name" />
                    <flux:input wire:model="storeHandle" label="Store handle" disabled />
                    <flux:error name="storeName" />

            <flux:separator />

                    <flux:heading size="lg">Defaults</flux:heading>
                    <flux:text class="mt-1">Currency, language, and timezone.</flux:text>

                    <flux:select wire:model="defaultCurrency" label="Default currency">
                        @foreach ($currencyOptions as $currency)
                            <flux:select.option value="{{ $currency }}">{{ $currency }}</flux:select.option>
                        @endforeach
                    </flux:select>

                    <flux:select wire:model="defaultLocale" label="Default locale">
                        @foreach ($localeOptions as $locale => $label)
                            <flux:select.option value="{{ $locale }}">{{ $label }}</flux:select.option>
                        @endforeach
                    </flux:select>

                    <flux:select wire:model="timezone" label="Timezone">
                        @foreach ($timezoneOptions as $timezoneOption)
                            <flux:select.option value="{{ $timezoneOption }}">{{ $timezoneOption }}</flux:select.option>
                        @endforeach
                    </flux:select>

            <flux:separator />

                    <flux:heading size="lg">Checkout</flux:heading>
                    <flux:text class="mt-1">Customer-facing storefront defaults.</flux:text>

                    <flux:switch wire:model="announcementEnabled" label="Announcement bar" align="left" />
                    <flux:input wire:model="announcementText" label="Announcement text" />
                    <flux:checkbox wire:model="guestCheckoutEnabled" label="Guest checkout enabled" />

                <flux:button type="submit" variant="primary" wire:loading.attr="disabled">
                    Save settings
                    Saving...
                </flux:button>

    </form>

                <flux:heading size="lg">Domains</flux:heading>
                <flux:text class="mt-1">Hostnames connected to this store.</flux:text>

                <flux:input wire:model="newHostname" label="Hostname" placeholder="shop.example.com" />
                <flux:select wire:model="newType" label="Type">
                    <flux:select.option value="storefront">Storefront</flux:select.option>
                    <flux:select.option value="admin">Admin</flux:select.option>
                    <flux:select.option value="api">API</flux:select.option>
                </flux:select>

                    <flux:button type="button" wire:click="addDomain" variant="primary" icon="plus">Add</flux:button>

                        Hostname
                        Type
                        Primary
                        TLS
                        Actions

                    @foreach ($domains as $domain)

getKey() }}">
                            {{ $domain->hostname }}
                            <flux:badge>{{ Str::headline($domain->type->value) }}</flux:badge>

                                @if ($domain->is_primary)
                                    <flux:badge color="green">Primary</flux:badge>
                                @else
                                    -
                                @endif

                            {{ Str::headline($domain->tls_mode) }}

                                    @unless ($domain->is_primary)
                                        <flux:button type="button" size="sm" variant="filled" wire:click="setPrimary({{ $domain->getKey() }})">Set primary</flux:button>
                                    @endunless
                                    <flux:button type="button" size="sm" variant="danger" wire:click="removeDomain({{ $domain->getKey() }})">Delete</flux:button>

                    @endforeach


output:
Chunk ID: 663d50
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1888
Output:

            <flux:heading size="xl">Settings</flux:heading>
            <flux:text class="mt-1">Store defaults, checkout preferences, and domains.</flux:text>

            <flux:button :href="route('admin.settings.index')" wire:navigate variant="primary">General</flux:button>
            <flux:button :href="route('admin.settings.shipping')" wire:navigate variant="filled">Shipping</flux:button>
            <flux:button :href="route('admin.settings.taxes')" wire:navigate variant="filled">Taxes</flux:button>

    @if (session('status'))
        <flux:callout color="green" icon="check-circle">{{ session('status') }}</flux:callout>
    @endif

    <form wire:submit="save" class="space-y-6">

                    <flux:heading size="lg">Store details</flux:heading>
                    <flux:text class="mt-1">Basic storefront identity.</flux:text>

                    <flux:input wire:model="storeName" label="Store name" />
                    <flux:input wire:model="storeHandle" label="Store handle" disabled />
                    <flux:error name="storeName" />

            <flux:separator />

                    <flux:heading size="lg">Defaults</flux:heading>
                    <flux:text class="mt-1">Currency, language, and timezone.</flux:text>

                    <flux:select wire:model="defaultCurrency" label="Default currency">
                        @foreach ($currencyOptions as $currency)
                            <flux:select.option value="{{ $currency }}">{{ $currency }}</flux:select.option>
                        @endforeach
                    </flux:select>

                    <flux:select wire:model="defaultLocale" label="Default locale">
                        @foreach ($localeOptions as $locale => $label)
                            <flux:select.option value="{{ $locale }}">{{ $label }}</flux:select.option>
                        @endforeach
                    </flux:select>

                    <flux:select wire:model="timezone" label="Timezone">
                        @foreach ($timezoneOptions as $timezoneOption)
                            <flux:select.option value="{{ $timezoneOption }}">{{ $timezoneOption }}</flux:select.option>
                        @endforeach
                    </flux:select>

            <flux:separator />

                    <flux:heading size="lg">Checkout</flux:heading>
                    <flux:text class="mt-1">Customer-facing storefront defaults.</flux:text>

                    <flux:switch wire:model="announcementEnabled" label="Announcement bar" align="left" />
                    <flux:input wire:model="announcementText" label="Announcement text" />
                    <flux:checkbox wire:model="guestCheckoutEnabled" label="Guest checkout enabled" />

                <flux:button type="submit" variant="primary" wire:loading.attr="disabled">
                    Save settings
                    Saving...
                </flux:button>

    </form>

                <flux:heading size="lg">Domains</flux:heading>
                <flux:text class="mt-1">Hostnames connected to this store.</flux:text>

                <flux:input wire:model="newHostname" label="Hostname" placeholder="shop.example.com" />
                <flux:select wire:model="newType" label="Type">
                    <flux:select.option value="storefront">Storefront</flux:select.option>
                    <flux:select.option value="admin">Admin</flux:select.option>
                    <flux:select.option value="api">API</flux:select.option>
                </flux:select>

                    <flux:button type="button" wire:click="addDomain" variant="primary" icon="plus">Add</flux:button>

                        Hostname
                        Type
                        Primary
                        TLS
                        Actions

                    @foreach ($domains as $domain)

getKey() }}">
                            {{ $domain->hostname }}
                            <flux:badge>{{ Str::headline($domain->type->value) }}</flux:badge>

                                @if ($domain->is_primary)
                                    <flux:badge color="green">Primary</flux:badge>
                                @else
                                    -
                                @endif

                            {{ Str::headline($domain->tls_mode) }}

                                    @unless ($domain->is_primary)
                                        <flux:button type="button" size="sm" variant="filled" wire:click="setPrimary({{ $domain->getKey() }})">Set primary</flux:button>
                                    @endunless
                                    <flux:button type="button" size="sm" variant="danger" wire:click="removeDomain({{ $domain->getKey() }})">Delete</flux:button>

                    @endforeach


output:
Chunk ID: ea3c20
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1937
Output:
<?php

use App\Http\Middleware\EnsureUserEmailIsVerified;
use App\Livewire\Admin\Analytics\Index as AdminAnalyticsIndex;
use App\Livewire\Admin\Apps\Index as AdminAppsIndex;
use App\Livewire\Admin\Apps\Show as AdminAppShow;
use App\Livewire\Admin\Auth\Login as AdminLogin;
use App\Livewire\Admin\Collections\Form as AdminCollectionForm;
use App\Livewire\Admin\Collections\Index as AdminCollectionsIndex;
use App\Livewire\Admin\Customers\Index as AdminCustomersIndex;
use App\Livewire\Admin\Customers\Show as AdminCustomerShow;
use App\Livewire\Admin\Dashboard as AdminDashboard;
use App\Livewire\Admin\Developers\Index as AdminDevelopersIndex;
use App\Livewire\Admin\Discounts\Form as AdminDiscountForm;
use App\Livewire\Admin\Discounts\Index as AdminDiscountsIndex;
use App\Livewire\Admin\Inventory\Index as AdminInventoryIndex;
use App\Livewire\Admin\Navigation\Index as AdminNavigationIndex;
use App\Livewire\Admin\Orders\Index as AdminOrdersIndex;
use App\Livewire\Admin\Orders\Show as AdminOrderShow;
use App\Livewire\Admin\Pages\Form as AdminPageForm;
use App\Livewire\Admin\Pages\Index as AdminPagesIndex;
use App\Livewire\Admin\Products\Form as AdminProductForm;
use App\Livewire\Admin\Products\Index as AdminProductsIndex;
use App\Livewire\Admin\Search\Settings as AdminSearchSettings;
use App\Livewire\Admin\Settings\Index as AdminSettingsIndex;
use App\Livewire\Admin\Settings\Shipping as AdminSettingsShipping;
use App\Livewire\Admin\Settings\Taxes as AdminSettingsTaxes;
use App\Livewire\Admin\Themes\Editor as AdminThemeEditor;
use App\Livewire\Admin\Themes\Index as AdminThemesIndex;
use App\Livewire\Storefront\Account\Auth\ForgotPassword as CustomerForgotPassword;
use App\Livewire\Storefront\Account\Auth\Login as CustomerLogin;
use App\Livewire\Storefront\Account\Auth\Register as CustomerRegister;
use App\Livewire\Storefront\Account\Auth\ResetPassword as CustomerResetPassword;
use App\Livewire\Storefront\Account\Orders\Index as CustomerOrdersIndex;
use App\Livewire\Storefront\Account\Orders\Show as CustomerOrderShow;
use App\Livewire\Storefront\Cart\Show as StorefrontCartShow;
use App\Livewire\Storefront\Checkout\Confirmation as StorefrontCheckoutConfirmation;
use App\Livewire\Storefront\Checkout\Show as StorefrontCheckoutShow;
use App\Livewire\Storefront\Collections\Index as StorefrontCollectionsIndex;
use App\Livewire\Storefront\Collections\Show as StorefrontCollectionShow;
use App\Livewire\Storefront\Home as StorefrontHome;
use App\Livewire\Storefront\Pages\Show as StorefrontPageShow;
use App\Livewire\Storefront\Products\Show as StorefrontProductShow;
use App\Livewire\Storefront\Search\Index as StorefrontSearchIndex;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;

Route::middleware(['storefront'])->group(function (): void {
    Route::livewire('/', StorefrontHome::class)->name('home');
    Route::livewire('collections', StorefrontCollectionsIndex::class)->name('collections.index');
    Route::livewire('collections/{handle}', StorefrontCollectionShow::class)->name('collections.show');
    Route::livewire('products/{handle}', StorefrontProductShow::class)->name('products.show');
    Route::livewire('cart', StorefrontCartShow::class)->name('cart.show');
    Route::livewire('checkout', StorefrontCheckoutShow::class)->name('checkout.show');
    Route::livewire('checkout/confirmation/{order}', StorefrontCheckoutConfirmation::class)->name('checkout.confirmation');
    Route::livewire('search', StorefrontSearchIndex::class)->name('search.index');
    Route::livewire('pages/{handle}', StorefrontPageShow::class)->name('pages.show');
});

Route::livewire('admin/login', AdminLogin::class)
    ->middleware('guest')
    ->name('admin.login');

Route::post('admin/logout', function () {
    Auth::guard('web')->logout();

    request()->session()->invalidate();
    request()->session()->regenerateToken();

    return redirect()->route('admin.login');
})->middleware('auth')->name('admin.logout');

Route::middleware(['auth', EnsureUserEmailIsVerified::class, 'admin'])->prefix('admin')->name('admin.')->group(function (): void {
    Route::livewire('/', AdminDashboard::class)->name('dashboard');
    Route::livewire('analytics', AdminAnalyticsIndex::class)->name('analytics.index');
    Route::livewire('apps', AdminAppsIndex::class)->name('apps.index');
    Route::livewire('apps/{installation}', AdminAppShow::class)->name('apps.show');
    Route::livewire('developers', AdminDevelopersIndex::class)->name('developers.index');
    Route::livewire('products', AdminProductsIndex::class)->name('products.index');
    Route::livewire('products/create', AdminProductForm::class)->name('products.create');
    Route::livewire('products/{product}/edit', AdminProductForm::class)->name('products.edit');
    Route::livewire('inventory', AdminInventoryIndex::class)->name('inventory.index');
    Route::livewire('orders', AdminOrdersIndex::class)->name('orders.index');
    Route::livewire('orders/{order}', AdminOrderShow::class)->name('orders.show');
    Route::livewire('customers', AdminCustomersIndex::class)->name('customers.index');
    Route::livewire('customers/{customer}', AdminCustomerShow::class)->name('customers.show');
    Route::livewire('discounts', AdminDiscountsIndex::class)->name('discounts.index');
    Route::livewire('discounts/create', AdminDiscountForm::class)->name('discounts.create');
    Route::livewire('discounts/{discount}/edit', AdminDiscountForm::class)->name('discounts.edit');
    Route::livewire('pages', AdminPagesIndex::class)->name('pages.index');
    Route::livewire('pages/create', AdminPageForm::class)->name('pages.create');
    Route::livewire('pages/{page}/edit', AdminPageForm::class)->name('pages.edit');
    Route::livewire('navigation', AdminNavigationIndex::class)->name('navigation.index');
    Route::livewire('themes', AdminThemesIndex::class)->name('themes.index');
    Route::livewire('themes/{theme}/editor', AdminThemeEditor::class)->name('themes.editor');
    Route::livewire('settings', AdminSettingsIndex::class)->name('settings.index');
    Route::livewire('settings/shipping', AdminSettingsShipping::class)->name('settings.shipping');
    Route::livewire('settings/taxes', AdminSettingsTaxes::class)->name('settings.taxes');
    Route::livewire('search/settings', AdminSearchSettings::class)->name('search.settings');
    Route::livewire('collections', AdminCollectionsIndex::class)->name('collections.index');
    Route::livewire('collections/create', AdminCollectionForm::class)->name('collections.create');
    Route::livewire('collections/{collection}/edit', AdminCollectionForm::class)->name('collections.edit');
});

Route::middleware(['storefront'])->group(function (): void {
    Route::livewire('account/login', CustomerLogin::class)
        ->middleware('guest:customer')
        ->name('account.login');

    Route::livewire('account/register', CustomerRegister::class)
        ->middleware('guest:customer')
        ->name('account.register');

    Route::livewire('account/forgot-password', CustomerForgotPassword::class)
        ->middleware('guest:customer')
        ->name('account.password.request');

    Route::livewire('account/reset-password/{token}', CustomerResetPassword::class)
        ->middleware('guest:customer')
        ->name('account.password.reset');

    Route::livewire('account', CustomerOrdersIndex::class)
        ->middleware('auth:customer')
        ->name('account.dashboard');

    Route::livewire('account/orders/{order}', CustomerOrderShow::class)
        ->middleware('auth:customer')
        ->name('account.orders.show');
});

Route::redirect('dashboard', 'admin')
    ->middleware(['auth', 'verified'])
    ->name('dashboard');

require __DIR__.'/settings.php';


command: sed -n '1,240p' resources/views/components/admin/sidebar.blade.php && sed -n '1,240p' tests/Feature/Admin/SettingsManagementTest.php

SettingsManagementTest.php

aggregated_output: sed: resources/views/components/admin/sidebar.blade.php: No such file or directory

status: failed


output:
Chunk ID: ac473d
Wall time: 0.0000 seconds
Process exited with code 1
Original token count: 21
Output:
sed: resources/views/components/admin/sidebar.blade.php: No such file or directory


cmd: rg --files resources/views | rg 'sidebar|navigation|layout|app'


cmd: sed -n '1,260p' tests/Feature/Admin/SettingsManagementTest.php


cmd: rg -n "admin.settings|Settings|sidebar|navigation" resources/views app/Livewire | head -200


command: sed -n '1,260p' tests/Feature/Admin/SettingsManagementTest.php

aggregated_output:
<?php

use App\Enums\ShippingRateType;
use App\Enums\StoreUserRole;
use App\Enums\TaxMode;
use App\Livewire\Admin\Settings\Index as AdminSettingsIndex;
use App\Livewire\Admin\Settings\Shipping as AdminSettingsShipping;
use App\Livewire\Admin\Settings\Taxes as AdminSettingsTaxes;
use App\Models\ShippingRate;
use App\Models\ShippingZone;
use App\Models\Store;
use App\Models\StoreDomain;
use App\Models\StoreSettings;
use App\Models\TaxSettings;
use App\Models\User;
use Database\Seeders\DatabaseSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Livewire\Livewire;

uses(RefreshDatabase::class);

beforeEach(function (): void {
    $this->withoutVite();
    $this->seed(DatabaseSeeder::class);
});

function adminSettingsStore(): Store
{
    $store = Store::query()->where('handle', 'acme-fashion')->firstOrFail();
    app()->instance('current_store', $store);

    return $store;
}

function adminSettingsUser(): User
{
    return User::query()->where('email', 'admin@acme.test')->firstOrFail();
}

function adminSettingsUserWithRole(Store $store, StoreUserRole $role): User
{
    $user = User::factory()->create();
    $user->stores()->attach($store->getKey(), [
        'role' => $role->value,
        'created_at' => now(),
    ]);

    return $user;
}

test('settings routes render for owners and reject staff', function (): void {
    $store = adminSettingsStore();
    $owner = adminSettingsUser();
    $staff = adminSettingsUserWithRole($store, StoreUserRole::Staff);

    foreach (['/admin/settings', '/admin/settings/shipping', '/admin/settings/taxes'] as $path) {
        $this->actingAs($owner)
            ->withSession(['current_store_id' => $store->getKey()])
            ->get($path)
            ->assertSuccessful();

        $this->actingAs($staff)
            ->withSession(['current_store_id' => $store->getKey()])
            ->get($path)
            ->assertForbidden();
    }
});

test('general settings update store defaults and domains', function (): void {
    $store = adminSettingsStore();
    $user = adminSettingsUser();

    Livewire::actingAs($user)
        ->test(AdminSettingsIndex::class)
        ->set('storeName', 'Acme Atelier')
        ->set('defaultCurrency', 'GBP')
        ->set('defaultLocale', 'de')
        ->set('timezone', 'Europe/Berlin')
        ->set('announcementEnabled', true)
        ->set('announcementText', 'Spring edits now live')
        ->set('guestCheckoutEnabled', false)
        ->call('save')
        ->assertHasNoErrors()
        ->set('newHostname', 'atelier.test')
        ->set('newType', 'storefront')
        ->call('addDomain')
        ->assertHasNoErrors();

    $settings = StoreSettings::query()->whereKey($store->getKey())->firstOrFail();

    expect($store->refresh()->name)->toBe('Acme Atelier')
        ->and($store->default_currency)->toBe('GBP')
        ->and($store->default_locale)->toBe('de')
        ->and($settings->settings_json['announcement']['text'])->toBe('Spring edits now live')
        ->and($settings->settings_json['checkout']['guest_checkout_enabled'])->toBeFalse()
        ->and(StoreDomain::query()->where('hostname', 'atelier.test')->where('store_id', $store->getKey())->exists())->toBeTrue();
});

test('shipping settings manage zones rates and address tests', function (): void {
    $store = adminSettingsStore();
    $user = adminSettingsUser();

    Livewire::actingAs($user)
        ->test(AdminSettingsShipping::class)
        ->set('zoneName', 'Nordics')
        ->set('zoneCountries', 'SE, NO')
        ->call('saveZone')
        ->assertHasNoErrors();

    $zone = ShippingZone::withoutGlobalScopes()
        ->where('store_id', $store->getKey())
        ->where('name', 'Nordics')
        ->firstOrFail();

    Livewire::actingAs($user)
        ->test(AdminSettingsShipping::class)
        ->call('addRate', $zone->getKey())
        ->set('rateName', 'Nordic Standard')
        ->set('rateType', ShippingRateType::Flat->value)
        ->set('rateAmount', '12.50')
        ->call('saveRate')
        ->assertHasNoErrors()
        ->set('testCountry', 'SE')
        ->call('testShippingAddress')
        ->assertSet('testResult.zone', 'Nordics');

    $rate = ShippingRate::withoutGlobalScopes()
        ->where('zone_id', $zone->getKey())
        ->where('name', 'Nordic Standard')
        ->firstOrFail();

    expect($zone->countries_json)->toBe(['SE', 'NO'])
        ->and($rate->type)->toBe(ShippingRateType::Flat)
        ->and($rate->config_json['amount'])->toBe(1250);
});

test('tax settings save manual and provider configuration', function (): void {
    $store = adminSettingsStore();
    $user = adminSettingsUser();

    Livewire::actingAs($user)
        ->test(AdminSettingsTaxes::class)
        ->set('manualRates', [
            ['country' => 'DE', 'name' => 'VAT', 'rate_percentage' => '19.00'],
            ['country' => 'FR', 'name' => 'TVA', 'rate_percentage' => '20.00'],
        ])
        ->set('pricesIncludeTax', true)
        ->call('save')
        ->assertHasNoErrors();

    $manual = TaxSettings::withoutGlobalScopes()->whereKey($store->getKey())->firstOrFail();

    expect($manual->mode)->toBe(TaxMode::Manual)
        ->and($manual->prices_include_tax)->toBeTrue()
        ->and($manual->config_json['rates'][1]['country'])->toBe('FR')
        ->and($manual->config_json['rates'][1]['rate_bps'])->toBe(2000);

    Livewire::actingAs($user)
        ->test(AdminSettingsTaxes::class)
        ->set('mode', TaxMode::Provider->value)
        ->set('provider', 'stripe_tax')
        ->set('providerApiKey', 'sk_test_tax')
        ->call('save')
        ->assertHasNoErrors();

    $provider = TaxSettings::withoutGlobalScopes()->whereKey($store->getKey())->firstOrFail();

    expect($provider->mode)->toBe(TaxMode::Provider)
        ->and($provider->provider)->toBe('stripe_tax')
        ->and($provider->config_json['provider_api_key'])->toBe('sk_test_tax');
});


command: rg --files resources/views | rg 'sidebar|navigation|layout|app'

cmd: rg --files resources/views

path: views

type: search

cmd: rg 'sidebar|navigation|layout|app'

query: sidebar|navigation|layout|app


output:
Chunk ID: 52184e
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 191
Output:
resources/views/layouts/storefront.blade.php
resources/views/layouts/app.blade.php
resources/views/layouts/auth/split.blade.php
resources/views/layouts/auth/simple.blade.php
resources/views/layouts/auth/card.blade.php
resources/views/layouts/app/sidebar.blade.php
resources/views/layouts/app/header.blade.php
resources/views/layouts/auth.blade.php
resources/views/livewire/admin/apps/show.blade.php
resources/views/livewire/admin/apps/index.blade.php
resources/views/livewire/admin/navigation/index.blade.php
resources/views/livewire/settings/appearance.blade.php
resources/views/components/app-logo.blade.php
resources/views/components/app-logo-icon.blade.php
resources/views/flux/icon/layout-grid.blade.php
resources/views/components/settings/layout.blade.php


output:
Chunk ID: c481ec
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 1479
Output:
<?php

use App\Enums\ShippingRateType;
use App\Enums\StoreUserRole;
use App\Enums\TaxMode;
use App\Livewire\Admin\Settings\Index as AdminSettingsIndex;
use App\Livewire\Admin\Settings\Shipping as AdminSettingsShipping;
use App\Livewire\Admin\Settings\Taxes as AdminSettingsTaxes;
use App\Models\ShippingRate;
use App\Models\ShippingZone;
use App\Models\Store;
use App\Models\StoreDomain;
use App\Models\StoreSettings;
use App\Models\TaxSettings;
use App\Models\User;
use Database\Seeders\DatabaseSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Livewire\Livewire;

uses(RefreshDatabase::class);

beforeEach(function (): void {
    $this->withoutVite();
    $this->seed(DatabaseSeeder::class);
});

function adminSettingsStore(): Store
{
    $store = Store::query()->where('handle', 'acme-fashion')->firstOrFail();
    app()->instance('current_store', $store);

    return $store;
}

function adminSettingsUser(): User
{
    return User::query()->where('email', 'admin@acme.test')->firstOrFail();
}

function adminSettingsUserWithRole(Store $store, StoreUserRole $role): User
{
    $user = User::factory()->create();
    $user->stores()->attach($store->getKey(), [
        'role' => $role->value,
        'created_at' => now(),
    ]);

    return $user;
}

test('settings routes render for owners and reject staff', function (): void {
    $store = adminSettingsStore();
    $owner = adminSettingsUser();
    $staff = adminSettingsUserWithRole($store, StoreUserRole::Staff);

    foreach (['/admin/settings', '/admin/settings/shipping', '/admin/settings/taxes'] as $path) {
        $this->actingAs($owner)
            ->withSession(['current_store_id' => $store->getKey()])
            ->get($path)
            ->assertSuccessful();

        $this->actingAs($staff)
            ->withSession(['current_store_id' => $store->getKey()])
            ->get($path)
            ->assertForbidden();
    }
});

test('general settings update store defaults and domains', function (): void {
    $store = adminSettingsStore();
    $user = adminSettingsUser();

    Livewire::actingAs($user)
        ->test(AdminSettingsIndex::class)
        ->set('storeName', 'Acme Atelier')
        ->set('defaultCurrency', 'GBP')
        ->set('defaultLocale', 'de')
        ->set('timezone', 'Europe/Berlin')
        ->set('announcementEnabled', true)
        ->set('announcementText', 'Spring edits now live')
        ->set('guestCheckoutEnabled', false)
        ->call('save')
        ->assertHasNoErrors()
        ->set('newHostname', 'atelier.test')
        ->set('newType', 'storefront')
        ->call('addDomain')
        ->assertHasNoErrors();

    $settings = StoreSettings::query()->whereKey($store->getKey())->firstOrFail();

    expect($store->refresh()->name)->toBe('Acme Atelier')
        ->and($store->default_currency)->toBe('GBP')
        ->and($store->default_locale)->toBe('de')
        ->and($settings->settings_json['announcement']['text'])->toBe('Spring edits now live')
        ->and($settings->settings_json['checkout']['guest_checkout_enabled'])->toBeFalse()
        ->and(StoreDomain::query()->where('hostname', 'atelier.test')->where('store_id', $store->getKey())->exists())->toBeTrue();
});

test('shipping settings manage zones rates and address tests', function (): void {
    $store = adminSettingsStore();
    $user = adminSettingsUser();

    Livewire::actingAs($user)
        ->test(AdminSettingsShipping::class)
        ->set('zoneName', 'Nordics')
        ->set('zoneCountries', 'SE, NO')
        ->call('saveZone')
        ->assertHasNoErrors();

    $zone = ShippingZone::withoutGlobalScopes()
        ->where('store_id', $store->getKey())
        ->where('name', 'Nordics')
        ->firstOrFail();

    Livewire::actingAs($user)
        ->test(AdminSettingsShipping::class)
        ->call('addRate', $zone->getKey())
        ->set('rateName', 'Nordic Standard')
        ->set('rateType', ShippingRateType::Flat->value)
        ->set('rateAmount', '12.50')
        ->call('saveRate')
        ->assertHasNoErrors()
        ->set('testCountry', 'SE')
        ->call('testShippingAddress')
        ->assertSet('testResult.zone', 'Nordics');

    $rate = ShippingRate::withoutGlobalScopes()
        ->where('zone_id', $zone->getKey())
        ->where('name', 'Nordic Standard')
        ->firstOrFail();

    expect($zone->countries_json)->toBe(['SE', 'NO'])
        ->and($rate->type)->toBe(ShippingRateType::Flat)
        ->and($rate->config_json['amount'])->toBe(1250);
});

test('tax settings save manual and provider configuration', function (): void {
    $store = adminSettingsStore();
    $user = adminSettingsUser();

    Livewire::actingAs($user)
        ->test(AdminSettingsTaxes::class)
        ->set('manualRates', [
            ['country' => 'DE', 'name' => 'VAT', 'rate_percentage' => '19.00'],
            ['country' => 'FR', 'name' => 'TVA', 'rate_percentage' => '20.00'],
        ])
        ->set('pricesIncludeTax', true)
        ->call('save')
        ->assertHasNoErrors();

    $manual = TaxSettings::withoutGlobalScopes()->whereKey($store->getKey())->firstOrFail();

    expect($manual->mode)->toBe(TaxMode::Manual)
        ->and($manual->prices_include_tax)->toBeTrue()
        ->and($manual->config_json['rates'][1]['country'])->toBe('FR')
        ->and($manual->config_json['rates'][1]['rate_bps'])->toBe(2000);

    Livewire::actingAs($user)
        ->test(AdminSettingsTaxes::class)
        ->set('mode', TaxMode::Provider->value)
        ->set('provider', 'stripe_tax')
        ->set('providerApiKey', 'sk_test_tax')
        ->call('save')
        ->assertHasNoErrors();

    $provider = TaxSettings::withoutGlobalScopes()->whereKey($store->getKey())->firstOrFail();

    expect($provider->mode)->toBe(TaxMode::Provider)
        ->and($provider->provider)->toBe('stripe_tax')
        ->and($provider->config_json['provider_api_key'])->toBe('sk_test_tax');
});


command: rg -n "admin.settings|Settings|sidebar|navigation" resources/views app/Livewire | head -200

type: search

cmd: rg -n 'admin.settings|Settings|sidebar|navigation' resources/views app/Livewire

query: admin.settings|Settings|sidebar|navigation

path: views

aggregated_output:
resources/views/partials/settings-heading.blade.php:2:    <flux:heading size="xl" level="1">{{ __('Settings') }}</flux:heading>
resources/views/layouts/storefront.blade.php:8:        @php($announcement = data_get($themeSettings ?? [], 'announcement', []))
resources/views/layouts/storefront.blade.php:30:            'sticky' => data_get($themeSettings ?? [], 'header.sticky', true),
resources/views/layouts/storefront.blade.php:37:
resources/views/layouts/storefront.blade.php:65:
{{ data_get($themeSettings ?? [], 'footer.tagline') }}

app/Livewire/Admin/Themes/Editor.php:8:use App\Models\ThemeSettings;
app/Livewire/Admin/Themes/Editor.php:9:use App\Services\ThemeSettingsService;
app/Livewire/Admin/Themes/Editor.php:27:    public function mount(Theme $theme, ThemeSettingsService $themeSettings): void
app/Livewire/Admin/Themes/Editor.php:38:            $themeSettings->defaultsForStore($store),
app/Livewire/Admin/Themes/Editor.php:50:    public function save(ThemeSettingsService $settings): void
app/Livewire/Admin/Themes/Editor.php:54:        ThemeSettings::withoutGlobalScopes()->updateOrCreate(
app/Livewire/Admin/Themes/Editor.php:68:    public function publish(ThemeSettingsService $settings): void
resources/views/layouts/app.blade.php:1:<x-layouts::app.sidebar :title="$title ?? null">
resources/views/layouts/app.blade.php:5:</x-layouts::app.sidebar>
app/Livewire/Admin/Navigation/Index.php:153:    public function saveMenu(NavigationService $navigation): void
app/Livewire/Admin/Navigation/Index.php:176:        $navigation->forget($menu);
app/Livewire/Admin/Navigation/Index.php:240:        return view('livewire.admin.navigation.index', [
app/Livewire/Admin/Search/Settings.php:5:use App\Models\SearchSettings;
app/Livewire/Admin/Search/Settings.php:12:class Settings extends Component
app/Livewire/Admin/Search/Settings.php:144:    private function settings(): SearchSettings
app/Livewire/Admin/Search/Settings.php:146:        return SearchSettings::withoutGlobalScopes()->firstOrCreate([
app/Livewire/Admin/Themes/Index.php:9:use App\Models\ThemeSettings;
app/Livewire/Admin/Themes/Index.php:10:use App\Services\ThemeSettingsService;
app/Livewire/Admin/Themes/Index.php:35:    public function publishTheme(int $themeId, ThemeSettingsService $settings): void
app/Livewire/Admin/Themes/Index.php:87:            ThemeSettings::withoutGlobalScopes()->create([
app/Livewire/Admin/Pages/Form.php:60:    public function save(NavigationService $navigation): void
app/Livewire/Admin/Pages/Form.php:101:        $this->forgetNavigation($store, $navigation);
app/Livewire/Admin/Pages/Form.php:107:    public function deletePage(NavigationService $navigation): void
app/Livewire/Admin/Pages/Form.php:118:        $this->forgetNavigation($store, $navigation);
app/Livewire/Admin/Pages/Form.php:167:    private function forgetNavigation(Store $store, NavigationService $navigation): void
app/Livewire/Admin/Pages/Form.php:172:            ->each(fn (NavigationMenu $menu): mixed => $navigation->forget($menu));
resources/views/layouts/app/header.blade.php:8:            <flux:sidebar.toggle class="lg:hidden mr-2" icon="bars-2" inset="left" />
resources/views/layouts/app/header.blade.php:48:        <flux:sidebar collapsible="mobile" sticky class="lg:hidden border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
resources/views/layouts/app/header.blade.php:49:            <flux:sidebar.header>
resources/views/layouts/app/header.blade.php:50:                <x-app-logo :sidebar="true" href="{{ route('dashboard') }}" wire:navigate />
resources/views/layouts/app/header.blade.php:51:                <flux:sidebar.collapse class="in-data-flux-sidebar-on-desktop:not-in-data-flux-sidebar-collapsed-desktop:-mr-2" />
resources/views/layouts/app/header.blade.php:52:            </flux:sidebar.header>
resources/views/layouts/app/header.blade.php:54:            <flux:sidebar.nav>
resources/views/layouts/app/header.blade.php:55:                <flux:sidebar.group :heading="__('Platform')">
resources/views/layouts/app/header.blade.php:56:                    <flux:sidebar.item icon="layout-grid" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate>
resources/views/layouts/app/header.blade.php:58:                    </flux:sidebar.item>
resources/views/layouts/app/header.blade.php:59:                </flux:sidebar.group>
resources/views/layouts/app/header.blade.php:60:            </flux:sidebar.nav>
resources/views/layouts/app/header.blade.php:64:            <flux:sidebar.nav>
resources/views/layouts/app/header.blade.php:65:                <flux:sidebar.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank">
resources/views/layouts/app/header.blade.php:67:                </flux:sidebar.item>
resources/view…9192 chars truncated…get($this->themeSettings(), 'home.featured_collection_limit', 4))
app/Livewire/Storefront/Home.php:48:    public function themeSettings(): array
app/Livewire/Storefront/Home.php:50:        return app(ThemeSettingsService::class)->forStore($this->store());
app/Livewire/Storefront/Home.php:59:            'themeSettings' => $this->themeSettings(),
app/Livewire/Admin/Settings/Taxes.php:3:namespace App\Livewire\Admin\Settings;
app/Livewire/Admin/Settings/Taxes.php:7:use App\Models\TaxSettings;
app/Livewire/Admin/Settings/Taxes.php:40:        $this->fillFromSettings($this->taxSettings($store));
app/Livewire/Admin/Settings/Taxes.php:76:        TaxSettings::withoutGlobalScopes()->updateOrCreate(
app/Livewire/Admin/Settings/Taxes.php:105:        return view('livewire.admin.settings.taxes')
app/Livewire/Admin/Settings/Taxes.php:125:    private function taxSettings(Store $store): TaxSettings
app/Livewire/Admin/Settings/Taxes.php:127:        return TaxSettings::withoutGlobalScopes()->firstOrCreate(
app/Livewire/Admin/Settings/Taxes.php:143:    private function fillFromSettings(TaxSettings $settings): void
resources/views/livewire/storefront/home.blade.php:2:    @php($hero = data_get($themeSettings, 'home.hero', []))
resources/views/livewire/admin/navigation/index.blade.php:17:                    wire:key="navigation-menu-{{ $menu->getKey() }}"
resources/views/livewire/admin/navigation/index.blade.php:38:

app/Livewire/Settings/Appearance.php:3:namespace App\Livewire\Settings;
app/Livewire/Settings/Password.php:3:namespace App\Livewire\Settings;
app/Livewire/Settings/TwoFactor/RecoveryCodes.php:3:namespace App\Livewire\Settings\TwoFactor;
resources/views/livewire/admin/settings/shipping.blade.php:9:            <flux:button :href="route('admin.settings.index')" wire:navigate variant="filled">General</flux:button>
resources/views/livewire/admin/settings/shipping.blade.php:10:            <flux:button :href="route('admin.settings.shipping')" wire:navigate variant="primary">Shipping</flux:button>
resources/views/livewire/admin/settings/shipping.blade.php:11:            <flux:button :href="route('admin.settings.taxes')" wire:navigate variant="filled">Taxes</flux:button>
resources/views/livewire/admin/settings/taxes.blade.php:9:            <flux:button :href="route('admin.settings.index')" wire:navigate variant="filled">General</flux:button>
resources/views/livewire/admin/settings/taxes.blade.php:10:            <flux:button :href="route('admin.settings.shipping')" wire:navigate variant="filled">Shipping</flux:button>
resources/views/livewire/admin/settings/taxes.blade.php:11:            <flux:button :href="route('admin.settings.taxes')" wire:navigate variant="primary">Taxes</flux:button>
app/Livewire/Settings/TwoFactor.php:3:namespace App\Livewire\Settings;
resources/views/livewire/admin/settings/index.blade.php:4:            <flux:heading size="xl">Settings</flux:heading>
resources/views/livewire/admin/settings/index.blade.php:9:            <flux:button :href="route('admin.settings.index')" wire:navigate variant="primary">General</flux:button>
resources/views/livewire/admin/settings/index.blade.php:10:            <flux:button :href="route('admin.settings.shipping')" wire:navigate variant="filled">Shipping</flux:button>
resources/views/livewire/admin/settings/index.blade.php:11:            <flux:button :href="route('admin.settings.taxes')" wire:navigate variant="filled">Taxes</flux:button>
app/Livewire/Settings/Profile.php:3:namespace App\Livewire\Settings;
app/Livewire/Settings/DeleteUserForm.php:3:namespace App\Livewire\Settings;
resources/views/components/app-logo.blade.php:2:    'sidebar' => false,
resources/views/components/app-logo.blade.php:5:@if($sidebar)
resources/views/components/app-logo.blade.php:6:    <flux:sidebar.brand :name="config('app.name')" {{ $attributes }}>
resources/views/components/app-logo.blade.php:10:    </flux:sidebar.brand>
resources/views/components/desktop-user-menu.blade.php:2:    <flux:sidebar.profile
resources/views/components/desktop-user-menu.blade.php:6:        data-test="sidebar-menu-button"
resources/views/components/desktop-user-menu.blade.php:23:                {{ __('Settings') }}
resources/views/livewire/settings/appearance.blade.php:4:    <flux:heading class="sr-only">{{ __('Appearance Settings') }}</flux:heading>
resources/views/livewire/settings/password.blade.php:4:    <flux:heading class="sr-only">{{ __('Password Settings') }}</flux:heading>
resources/views/livewire/settings/profile.blade.php:4:    <flux:heading class="sr-only">{{ __('Profile Settings') }}</flux:heading>
resources/views/components/settings/layout.blade.php:3:        <flux:navlist aria-label="{{ __('Settings') }}">
resources/views/livewire/settings/two-factor.blade.php:4:    <flux:heading class="sr-only">{{ __('Two-Factor Authentication Settings') }}</flux:heading>


output:
Chunk ID: a82366
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 4798
Output:
resources/views/partials/settings-heading.blade.php:2:    <flux:heading size="xl" level="1">{{ __('Settings') }}</flux:heading>
resources/views/layouts/storefront.blade.php:8:        @php($announcement = data_get($themeSettings ?? [], 'announcement', []))
resources/views/layouts/storefront.blade.php:30:            'sticky' => data_get($themeSettings ?? [], 'header.sticky', true),
resources/views/layouts/storefront.blade.php:37:
resources/views/layouts/storefront.blade.php:65:
{{ data_get($themeSettings ?? [], 'footer.tagline') }}

app/Livewire/Admin/Themes/Editor.php:8:use App\Models\ThemeSettings;
app/Livewire/Admin/Themes/Editor.php:9:use App\Services\ThemeSettingsService;
app/Livewire/Admin/Themes/Editor.php:27:    public function mount(Theme $theme, ThemeSettingsService $themeSettings): void
app/Livewire/Admin/Themes/Editor.php:38:            $themeSettings->defaultsForStore($store),
app/Livewire/Admin/Themes/Editor.php:50:    public function save(ThemeSettingsService $settings): void
app/Livewire/Admin/Themes/Editor.php:54:        ThemeSettings::withoutGlobalScopes()->updateOrCreate(
app/Livewire/Admin/Themes/Editor.php:68:    public function publish(ThemeSettingsService $settings): void
resources/views/layouts/app.blade.php:1:<x-layouts::app.sidebar :title="$title ?? null">
resources/views/layouts/app.blade.php:5:</x-layouts::app.sidebar>
app/Livewire/Admin/Navigation/Index.php:153:    public function saveMenu(NavigationService $navigation): void
app/Livewire/Admin/Navigation/Index.php:176:        $navigation->forget($menu);
app/Livewire/Admin/Navigation/Index.php:240:        return view('livewire.admin.navigation.index', [
app/Livewire/Admin/Search/Settings.php:5:use App\Models\SearchSettings;
app/Livewire/Admin/Search/Settings.php:12:class Settings extends Component
app/Livewire/Admin/Search/Settings.php:144:    private function settings(): SearchSettings
app/Livewire/Admin/Search/Settings.php:146:        return SearchSettings::withoutGlobalScopes()->firstOrCreate([
app/Livewire/Admin/Themes/Index.php:9:use App\Models\ThemeSettings;
app/Livewire/Admin/Themes/Index.php:10:use App\Services\ThemeSettingsService;
app/Livewire/Admin/Themes/Index.php:35:    public function publishTheme(int $themeId, ThemeSettingsService $settings): void
app/Livewire/Admin/Themes/Index.php:87:            ThemeSettings::withoutGlobalScopes()->create([
app/Livewire/Admin/Pages/Form.php:60:    public function save(NavigationService $navigation): void
app/Livewire/Admin/Pages/Form.php:101:        $this->forgetNavigation($store, $navigation);
app/Livewire/Admin/Pages/Form.php:107:    public function deletePage(NavigationService $navigation): void
app/Livewire/Admin/Pages/Form.php:118:        $this->forgetNavigation($store, $navigation);
app/Livewire/Admin/Pages/Form.php:167:    private function forgetNavigation(Store $store, NavigationService $navigation): void
app/Livewire/Admin/Pages/Form.php:172:            ->each(fn (NavigationMenu $menu): mixed => $navigation->forget($menu));
resources/views/layouts/app/header.blade.php:8:            <flux:sidebar.toggle class="lg:hidden mr-2" icon="bars-2" inset="left" />
resources/views/layouts/app/header.blade.php:48:        <flux:sidebar collapsible="mobile" sticky class="lg:hidden border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
resources/views/layouts/app/header.blade.php:49:            <flux:sidebar.header>
resources/views/layouts/app/header.blade.php:50:                <x-app-logo :sidebar="true" href="{{ route('dashboard') }}" wire:navigate />
resources/views/layouts/app/header.blade.php:51:                <flux:sidebar.collapse class="in-data-flux-sidebar-on-desktop:not-in-data-flux-sidebar-collapsed-desktop:-mr-2" />
resources/views/layouts/app/header.blade.php:52:            </flux:sidebar.header>
resources/views/layouts/app/header.blade.php:54:            <flux:sidebar.nav>
resources/views/layouts/app/header.blade.php:55:                <flux:sidebar.group :heading="__('Platform')">
resources/views/layouts/app/header.blade.php:56:                    <flux:sidebar.item icon="layout-grid" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate>
resources/views/layouts/app/header.blade.php:58:                    </flux:sidebar.item>
resources/views/layouts/app/header.blade.php:59:                </flux:sidebar.group>
resources/views/layouts/app/header.blade.php:60:            </flux:sidebar.nav>
resources/views/layouts/app/header.blade.php:64:            <flux:sidebar.nav>
resources/views/layouts/app/header.blade.php:65:                <flux:sidebar.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank">
resources/views/layouts/app/header.blade.php:67:                </flux:sidebar.item>
resources/views/layouts/app/header.blade.php:68:                <flux:sidebar.item icon="book-open-text" href="https://laravel.com/docs/starter-kits#livewire" target="_blank">
resources/views/layouts/app/header.blade.php:70:                </flux:sidebar.item>
resources/views/layouts/app/header.blade.php:71:            </flux:sidebar.nav>
resources/views/layouts/app/header.blade.php:72:        </flux:sidebar>
app/Livewire/Admin/Settings/Shipping.php:3:namespace App\Livewire\Admin\Settings;
app/Livewire/Admin/Settings/Shipping.php:267:        return view('livewire.admin.settings.shipping', [
resources/views/layouts/app/sidebar.blade.php:7:        <flux:sidebar sticky collapsible="mobile" class="border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
resources/views/layouts/app/sidebar.blade.php:8:            <flux:sidebar.header>
resources/views/layouts/app/sidebar.blade.php:9:                <x-app-logo :sidebar="true" href="{{ route('admin.dashboard') }}" wire:navigate />
resources/views/layouts/app/sidebar.blade.php:10:                <flux:sidebar.collapse class="lg:hidden" />
resources/views/layouts/app/sidebar.blade.php:11:            </flux:sidebar.header>
resources/views/layouts/app/sidebar.blade.php:13:            <flux:sidebar.nav>
resources/views/layouts/app/sidebar.blade.php:14:                <flux:sidebar.group :heading="__('Platform')" class="grid">
resources/views/layouts/app/sidebar.blade.php:15:                    <flux:sidebar.item icon="home" :href="route('admin.dashboard')" :current="request()->routeIs('admin.dashboard')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:17:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:19:                    <flux:sidebar.item icon="chart-bar" :href="route('admin.analytics.index')" :current="request()->routeIs('admin.analytics.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:21:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:23:                    <flux:sidebar.item icon="squares-2x2" :href="route('admin.apps.index')" :current="request()->routeIs('admin.apps.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:25:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:27:                    <flux:sidebar.item icon="code-bracket" :href="route('admin.developers.index')" :current="request()->routeIs('admin.developers.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:29:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:30:                </flux:sidebar.group>
resources/views/layouts/app/sidebar.blade.php:32:                <flux:sidebar.group :heading="__('Products')" class="grid">
resources/views/layouts/app/sidebar.blade.php:33:                    <flux:sidebar.item icon="cube" :href="route('admin.products.index')" :current="request()->routeIs('admin.products.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:35:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:37:                    <flux:sidebar.item icon="rectangle-stack" :href="route('admin.collections.index')" :current="request()->routeIs('admin.collections.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:39:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:41:                    <flux:sidebar.item icon="archive-box" :href="route('admin.inventory.index')" :current="request()->routeIs('admin.inventory.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:43:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:44:                </flux:sidebar.group>
resources/views/layouts/app/sidebar.blade.php:46:                <flux:sidebar.group :heading="__('Operations')" class="grid">
resources/views/layouts/app/sidebar.blade.php:47:                    <flux:sidebar.item icon="shopping-bag" :href="route('admin.orders.index')" :current="request()->routeIs('admin.orders.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:49:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:51:                    <flux:sidebar.item icon="users" :href="route('admin.customers.index')" :current="request()->routeIs('admin.customers.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:53:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:55:                    <flux:sidebar.item icon="tag" :href="route('admin.discounts.index')" :current="request()->routeIs('admin.discounts.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:57:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:58:                </flux:sidebar.group>
resources/views/layouts/app/sidebar.blade.php:60:                <flux:sidebar.group :heading="__('Storefront')" class="grid">
resources/views/layouts/app/sidebar.blade.php:61:                    <flux:sidebar.item icon="document-text" :href="route('admin.pages.index')" :current="request()->routeIs('admin.pages.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:63:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:65:                    <flux:sidebar.item icon="bars-3" :href="route('admin.navigation.index')" :current="request()->routeIs('admin.navigation.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:67:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:69:                    <flux:sidebar.item icon="paint-brush" :href="route('admin.themes.index')" :current="request()->routeIs('admin.themes.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:71:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:72:                </flux:sidebar.group>
resources/views/layouts/app/sidebar.blade.php:74:                <flux:sidebar.group :heading="__('Configuration')" class="grid">
resources/views/layouts/app/sidebar.blade.php:75:                    <flux:sidebar.item icon="cog-6-tooth" :href="route('admin.settings.index')" :current="request()->routeIs('admin.settings.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:76:                        {{ __('Settings') }}
resources/views/layouts/app/sidebar.blade.php:77:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:79:                    <flux:sidebar.item icon="magnifying-glass" :href="route('admin.search.settings')" :current="request()->routeIs('admin.search.*')" wire:navigate>
resources/views/layouts/app/sidebar.blade.php:81:                    </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:82:                </flux:sidebar.group>
resources/views/layouts/app/sidebar.blade.php:83:            </flux:sidebar.nav>
resources/views/layouts/app/sidebar.blade.php:87:            <flux:sidebar.nav>
resources/views/layouts/app/sidebar.blade.php:88:                <flux:sidebar.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank">
resources/views/layouts/app/sidebar.blade.php:90:                </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:92:                <flux:sidebar.item icon="book-open-text" href="https://laravel.com/docs/starter-kits#livewire" target="_blank">
resources/views/layouts/app/sidebar.blade.php:94:                </flux:sidebar.item>
resources/views/layouts/app/sidebar.blade.php:95:            </flux:sidebar.nav>
resources/views/layouts/app/sidebar.blade.php:98:        </flux:sidebar>
resources/views/layouts/app/sidebar.blade.php:102:            <flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" />
resources/views/layouts/app/sidebar.blade.php:133:                            {{ __('Settings') }}
app/Livewire/Admin/Settings/Index.php:3:namespace App\Livewire\Admin\Settings;
app/Livewire/Admin/Settings/Index.php:8:use App\Models\StoreSettings;
app/Livewire/Admin/Settings/Index.php:48:        $settings = $this->storeSettings($store)->settings_json ?? [];
app/Livewire/Admin/Settings/Index.php:84:        $settings = $this->storeSettings($store);
app/Livewire/Admin/Settings/Index.php:98:        session()->flash('status', 'Settings saved');
app/Livewire/Admin/Settings/Index.php:99:        $this->dispatch('toast', type: 'success', message: __('Settings saved'));
app/Livewire/Admin/Settings/Index.php:221:        return view('livewire.admin.settings.index', [
app/Livewire/Admin/Settings/Index.php:227:            'title' => __('Settings'),
app/Livewire/Admin/Settings/Index.php:245:    private function storeSettings(Store $store): StoreSettings
app/Livewire/Admin/Settings/Index.php:247:        return StoreSettings::query()->firstOrCreate(
app/Livewire/Storefront/Home.php:8:use App\Services\ThemeSettingsService;
app/Livewire/Storefront/Home.php:31:            ->limit((int) data_get($this->themeSettings(), 'home.featured_product_limit', 8))
app/Livewire/Storefront/Home.php:41:            ->limit((int) data_get($this->themeSettings(), 'home.featured_collection_limit', 4))
app/Livewire/Storefront/Home.php:48:    public function themeSettings(): array
app/Livewire/Storefront/Home.php:50:        return app(ThemeSettingsService::class)->forStore($this->store());
app/Livewire/Storefront/Home.php:59:            'themeSettings' => $this->themeSettings(),
app/Livewire/Admin/Settings/Taxes.php:3:namespace App\Livewire\Admin\Settings;
app/Livewire/Admin/Settings/Taxes.php:7:use App\Models\TaxSettings;
app/Livewire/Admin/Settings/Taxes.php:40:        $this->fillFromSettings($this->taxSettings($store));
app/Livewire/Admin/Settings/Taxes.php:76:        TaxSettings::withoutGlobalScopes()->updateOrCreate(
app/Livewire/Admin/Settings/Taxes.php:105:        return view('livewire.admin.settings.taxes')
app/Livewire/Admin/Settings/Taxes.php:125:    private function taxSettings(Store $store): TaxSettings
app/Livewire/Admin/Settings/Taxes.php:127:        return TaxSettings::withoutGlobalScopes()->firstOrCreate(
app/Livewire/Admin/Settings/Taxes.php:143:    private function fillFromSettings(TaxSettings $settings): void
resources/views/livewire/storefront/home.blade.php:2:    @php($hero = data_get($themeSettings, 'home.hero', []))
resources/views/livewire/admin/navigation/index.blade.php:17:                    wire:key="navigation-menu-{{ $menu->getKey() }}"
resources/views/livewire/admin/navigation/index.blade.php:38:

app/Livewire/Settings/Appearance.php:3:namespace App\Livewire\Settings;
app/Livewire/Settings/Password.php:3:namespace App\Livewire\Settings;
app/Livewire/Settings/TwoFactor/RecoveryCodes.php:3:namespace App\Livewire\Settings\TwoFactor;
resources/views/livewire/admin/settings/shipping.blade.php:9:            <flux:button :href="route('admin.settings.index')" wire:navigate variant="filled">General</flux:button>
resources/views/livewire/admin/settings/shipping.blade.php:10:            <flux:button :href="route('admin.settings.shipping')" wire:navigate variant="primary">Shipping</flux:button>
resources/views/livewire/admin/settings/shipping.blade.php:11:            <flux:button :href="route('admin.settings.taxes')" wire:navigate variant="filled">Taxes</flux:button>
resources/views/livewire/admin/settings/taxes.blade.php:9:            <flux:button :href="route('admin.settings.index')" wire:navigate variant="filled">General</flux:button>
resources/views/livewire/admin/settings/taxes.blade.php:10:            <flux:button :href="route('admin.settings.shipping')" wire:navigate variant="filled">Shipping</flux:button>
resources/views/livewire/admin/settings/taxes.blade.php:11:            <flux:button :href="route('admin.settings.taxes')" wire:navigate variant="primary">Taxes</flux:button>
app/Livewire/Settings/TwoFactor.php:3:namespace App\Livewire\Settings;
resources/views/livewire/admin/settings/index.blade.php:4:            <flux:heading size="xl">Settings</flux:heading>
resources/views/livewire/admin/settings/index.blade.php:9:            <flux:button :href="route('admin.settings.index')" wire:navigate variant="primary">General</flux:button>
resources/views/livewire/admin/settings/index.blade.php:10:            <flux:button :href="route('admin.settings.shipping')" wire:navigate variant="filled">Shipping</flux:button>
resources/views/livewire/admin/settings/index.blade.php:11:            <flux:button :href="route('admin.settings.taxes')" wire:navigate variant="filled">Taxes</flux:button>
app/Livewire/Settings/Profile.php:3:namespace App\Livewire\Settings;
app/Livewire/Settings/DeleteUserForm.php:3:namespace App\Livewire\Settings;
resources/views/components/app-logo.blade.php:2:    'sidebar' => false,
resources/views/components/app-logo.blade.php:5:@if($sidebar)
resources/views/components/app-logo.blade.php:6:    <flux:sidebar.brand :name="config('app.name')" {{ $attributes }}>
resources/views/components/app-logo.blade.php:10:    </flux:sidebar.brand>
resources/views/components/desktop-user-menu.blade.php:2:    <flux:sidebar.profile
resources/views/components/desktop-user-menu.blade.php:6:        data-test="sidebar-menu-button"
resources/views/components/desktop-user-menu.blade.php:23:                {{ __('Settings') }}
resources/views/livewire/settings/appearance.blade.php:4:    <flux:heading class="sr-only">{{ __('Appearance Settings') }}</flux:heading>
resources/views/livewire/settings/password.blade.php:4:    <flux:heading class="sr-only">{{ __('Password Settings') }}</flux:heading>
resources/views/livewire/settings/profile.blade.php:4:    <flux:heading class="sr-only">{{ __('Profile Settings') }}</flux:heading>
resources/views/components/settings/layout.blade.php:3:        <flux:navlist aria-label="{{ __('Settings') }}">
resources/views/livewire/settings/two-factor.blade.php:4:    <flux:heading class="sr-only">{{ __('Two-Factor Authentication Settings') }}</flux:heading>


cmd: rg -n "11\.5|Checkout Settings|Notification|Notifications|checkout" specs/03-ADMIN-UI.md | head -120


command: rg -n "11\.5|Checkout Settings|Notification|Notifications|checkout" specs/03-ADMIN-UI.md | head -120

type: search

cmd: rg -n "11\\.5|Checkout Settings|Notification|Notifications|checkout" specs/03-ADMIN-UI.md

query: 11\.5|Checkout Settings|Notification|Notifications|checkout

aggregated_output:
128:| `unreadNotificationCount` | `int` | Count of unread notifications |
156:- Notification bell shows an unread count badge (positioned absolutely over the icon) when `unreadNotificationCount > 0`.
165:| Notification bell | `button` (icon: bell, variant: ghost) |
166:| Notification count | `badge` |
179:### 1.5 Toast Notifications
227:| `funnelData` | `array` | Funnel steps: `{visits, add_to_cart, checkout_started, checkout_completed}` |
1312:|  ( ) Discount code - Customers enter a code at checkout          |
1313:|  (o) Automatic discount - Applied automatically at checkout      |
1353:**Type section:** Two radio buttons - "Discount code" (description: "Customers enter a code at checkout") and "Automatic discount" (description: "Applied automatically at checkout"). Selecting type is live-bound.
1423:Domains is a tab within the Settings page (`/admin/settings`), not a separate route. The Settings page has tabs: General, Domains, Shipping, Taxes, Checkout, Notifications.
2116:- Event type select with options: order.created, order.updated, order.cancelled, product.created, product.updated, product.deleted, customer.created, checkout.completed, fulfillment.created, refund.created
2326:### 19.4 Toast Notifications


output:
Chunk ID: 891bbb
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 309
Output:
128:| `unreadNotificationCount` | `int` | Count of unread notifications |
156:- Notification bell shows an unread count badge (positioned absolutely over the icon) when `unreadNotificationCount > 0`.
165:| Notification bell | `button` (icon: bell, variant: ghost) |
166:| Notification count | `badge` |
179:### 1.5 Toast Notifications
227:| `funnelData` | `array` | Funnel steps: `{visits, add_to_cart, checkout_started, checkout_completed}` |
1312:|  ( ) Discount code - Customers enter a code at checkout          |
1313:|  (o) Automatic discount - Applied automatically at checkout      |
1353:**Type section:** Two radio buttons - "Discount code" (description: "Customers enter a code at checkout") and "Automatic discount" (description: "Applied automatically at checkout"). Selecting type is live-bound.
1423:Domains is a tab within the Settings page (`/admin/settings`), not a separate route. The Settings page has tabs: General, Domains, Shipping, Taxes, Checkout, Notifications.
2116:- Event type select with options: order.created, order.updated, order.cancelled, product.created, product.updated, product.deleted, customer.created, checkout.completed, fulfillment.created, refund.created
2326:### 19.4 Toast Notifications


cmd: sed -n '1,220p' database/seeders/StoreSeeder.php


cmd: rg -n "settings_json|guest_checkout|notification|checkout" database app tests resources specs -g '!vendor'


cmd: sed -n '1,180p' app/Models/StoreSettings.php && sed -n '1,220p' database/migrations/*create_store_settings_table.php


command: sed -n '1,220p' database/seeders/StoreSeeder.php

aggregated_output:
<?php

namespace Database\Seeders;

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

class StoreSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $organization = Organization::query()->where('billing_email', 'billing@acme.test')->firstOrFail();

        foreach ([
            ['handle' => 'acme-fashion', 'name' => 'Acme Fashion'],
            ['handle' => 'acme-electronics', 'name' => 'Acme Electronics'],
        ] as $store) {
            Store::query()->updateOrCreate(
                ['handle' => $store['handle']],
                [
                    'organization_id' => $organization->getKey(),
                    'name' => $store['name'],
                    'status' => 'active',
                    'default_currency' => 'EUR',
                    'default_locale' => 'en',
                    'timezone' => 'Europe/Berlin',
                ],
            );
        }
    }
}


output:
Chunk ID: 61f37e
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 249
Output:
<?php

namespace Database\Seeders;

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

class StoreSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $organization = Organization::query()->where('billing_email', 'billing@acme.test')->firstOrFail();

        foreach ([
            ['handle' => 'acme-fashion', 'name' => 'Acme Fashion'],
            ['handle' => 'acme-electronics', 'name' => 'Acme Electronics'],
        ] as $store) {
            Store::query()->updateOrCreate(
                ['handle' => $store['handle']],
                [
                    'organization_id' => $organization->getKey(),
                    'name' => $store['name'],
                    'status' => 'active',
                    'default_currency' => 'EUR',
                    'default_locale' => 'en',
                    'timezone' => 'Europe/Berlin',
                ],
            );
        }
    }
}


command: rg -n "settings_json|guest_checkout|notification|checkout" database app tests resources specs -g '!vendor'

type: search

cmd: rg -n 'settings_json|guest_checkout|notification|checkout' database app tests resources specs -g '!vendor'

query: settings_json|guest_checkout|notification|checkout

path: database

aggregated_output:
tests/Feature/Analytics/AnalyticsServiceTest.php:66:        $analytics->track($store, AnalyticsEventType::CheckoutStarted->value, ['cart_id' => $index], 'agg-session-'.$index, null, "agg-checkout-{$index}", $date->copy()->addHours(2)->addMinutes($index));
tests/Feature/Analytics/AnalyticsServiceTest.php:80:        ->and($daily->checkout_started_count)->toBe(2)
tests/Feature/Analytics/AnalyticsServiceTest.php:81:        ->and($daily->checkout_completed_count)->toBe(2)
database/factories/AnalyticsDailyFactory.php:31:            'checkout_started_count' => fake()->numberBetween(0, 20),
database/factories/AnalyticsDailyFactory.php:32:            'checkout_completed_count' => $orders,
database/factories/StoreSettingsFactory.php:22:            'settings_json' => [
database/factories/StoreSettingsFactory.php:23:                'checkout' => [
database/factories/StoreSettingsFactory.php:24:                    'guest_checkout_enabled' => true,
database/factories/StoreSettingsFactory.php:26:                'notifications' => [
specs/01-DATABASE-SCHEMA.md:146:| settings_json | TEXT | No | '{}' | - | JSON settings object |
specs/01-DATABASE-SCHEMA.md:418:| settings_json | TEXT | No | '{}' | - | JSON settings object |
specs/01-DATABASE-SCHEMA.md:577:### checkouts
specs/01-DATABASE-SCHEMA.md:586:| customer_id | INTEGER | Yes | NULL | FK -> customers(id) ON DELETE SET NULL | Nullable for guest checkout |
specs/01-DATABASE-SCHEMA.md:602:- `idx_checkouts_store_id` on (`store_id`) - FK lookup
specs/01-DATABASE-SCHEMA.md:603:- `idx_checkouts_cart_id` on (`cart_id`) - Finding checkout for a cart
specs/01-DATABASE-SCHEMA.md:604:- `idx_checkouts_customer_id` on (`customer_id`) - Listing checkouts per customer
specs/01-DATABASE-SCHEMA.md:605:- `idx_checkouts_status` on (`store_id`, `status`) - Filtering checkouts by status
specs/01-DATABASE-SCHEMA.md:606:- `idx_checkouts_expires_at` on (`expires_at`) - Cleanup of expired checkouts
specs/01-DATABASE-SCHEMA.md:715:| password_hash | TEXT | Yes | NULL | - | Nullable for guest checkout customers |
specs/01-DATABASE-SCHEMA.md:726:**Notes:** `password_hash` is nullable to allow guest checkout customers who may later claim their account. Email is unique per store, not globally.
specs/01-DATABASE-SCHEMA.md:939:**Notes:** Event types include: `page_view`, `product_view`, `add_to_cart`, `remove_from_cart`, `checkout_started`, `checkout_completed`, `search`. This table will grow fast - consider periodic archiving or partitioning by date for production workloads beyond SQLite.
specs/01-DATABASE-SCHEMA.md:956:| checkout_started_count | INTEGER | No | 0 | - | Checkout-started events |
specs/01-DATABASE-SCHEMA.md:957:| checkout_completed_count | INTEGER | No | 0 | - | Checkout-completed events |
specs/01-DATABASE-SCHEMA.md:1247:        TEXT settings_json
specs/01-DATABASE-SCHEMA.md:1343:        TEXT settings_json
specs/01-DATABASE-SCHEMA.md:1377:    stores ||--o{ checkouts : "has"
specs/01-DATABASE-SCHEMA.md:1378:    carts ||--o{ checkouts : "converted to"
specs/01-DATABASE-SCHEMA.md:1561:        checkouts
specs/01-DATABASE-SCHEMA.md:1619:    stores --> checkouts
specs/01-DATABASE-SCHEMA.md:1620:    carts --> checkouts
specs/01-DATABASE-SCHEMA.md:1621:    customers --> checkouts
specs/01-DATABASE-SCHEMA.md:1647:- **Batch 5** (depends on Batch 4): `product_option_values`, `inventory_items`, `cart_lines`, `checkouts`, `orders`, `analytics_events`, `analytics_daily`, `webhook_deliveries`
specs/01-DATABASE-SCHEMA.md:1677:| 5 - Cart, Checkout, Discounts, Shipping, Taxes | carts, cart_lines, checkouts, shipping_zones, shipping_rates, tax_settings, discounts | 7 |
tests/Feature/Orders/OrderServiceTest.php:40:        'settings_json' => [
tests/Feature/Orders/OrderServiceTest.php:121:    $checkout = app(CheckoutService::class)->createFromCart($cart);
tests/Feature/Orders/OrderServiceTest.php:122:    $checkout = app(CheckoutService::class)->setAddress($checkout, [
tests/Feature/Orders/OrderServiceTest.php:133:    $checkout = app(CheckoutService::class)->setShippingMethod($checkout, $rate->getKey());
tests/Feature/Orders/OrderServiceTest.php:136:        $checkout->forceFill(['discount_code' => $discountCode])->save();
tests/Feature/Orders/OrderServiceTest.php:137:        app(PricingEngine::class)->calculate($checkout);
tests/Feature/Orders/OrderServiceTest.php:140:    $checkout = app(CheckoutService::class)->selectPaymentMethod($checkout, $paymentMethod);
tests/Feature/Orders/OrderServiceTest.php:142:    return [$checkout, $variant, $cart];
tests/Feature/Orders/OrderServiceTest.php:145:test('checkout completion creates a paid order and commits inventory', function () {
tests/Feature/Orders/OrderServiceTest.php:153:    [$checkout, $variant, $cart] = orderCompletionCheckout($store, discountCode: 'SAVE500');
tests/Feature/Orders/OrderServiceTest.php:157:    $order = app(CheckoutService::class)->completeCheckout($checkout, [
tests/Feature/Orders/OrderServiceTest.php:176:        ->and($checkout->refresh()->stat…94594 chars truncated…out = $this->checkout();
app/Livewire/Storefront/Checkout/Show.php:134:        if (! $checkout instanceof Checkout) {
app/Livewire/Storefront/Checkout/Show.php:145:            app(CheckoutService::class)->setShippingMethod($checkout, $this->selectedShippingRateId);
app/Livewire/Storefront/Checkout/Show.php:156:        $checkout = $this->checkout();
app/Livewire/Storefront/Checkout/Show.php:158:        if (! $checkout instanceof Checkout) {
app/Livewire/Storefront/Checkout/Show.php:162:        $checkout->forceFill([
app/Livewire/Storefront/Checkout/Show.php:167:            app(PricingEngine::class)->calculate($checkout);
app/Livewire/Storefront/Checkout/Show.php:170:            $checkout->forceFill(['discount_code' => null])->save();
app/Livewire/Storefront/Checkout/Show.php:172:            app(PricingEngine::class)->calculate($checkout);
app/Livewire/Storefront/Checkout/Show.php:186:        $checkout = $this->checkout();
app/Livewire/Storefront/Checkout/Show.php:188:        if (! $checkout instanceof Checkout) {
app/Livewire/Storefront/Checkout/Show.php:193:            app(CheckoutService::class)->selectPaymentMethod($checkout, $this->paymentMethod);
app/Livewire/Storefront/Checkout/Show.php:220:        $checkout = $this->checkout();
app/Livewire/Storefront/Checkout/Show.php:222:        if (! $checkout instanceof Checkout) {
app/Livewire/Storefront/Checkout/Show.php:227:            if ($checkout->status !== CheckoutStatus::PaymentSelected) {
app/Livewire/Storefront/Checkout/Show.php:228:                $checkout = app(CheckoutService::class)->selectPaymentMethod($checkout, $this->paymentMethod);
app/Livewire/Storefront/Checkout/Show.php:231:            $order = app(CheckoutService::class)->completeCheckout($checkout, [
app/Livewire/Storefront/Checkout/Show.php:243:            $this->redirectRoute('checkout.confirmation', ['order' => $order], navigate: true);
app/Livewire/Storefront/Checkout/Show.php:279:    public function checkout(): ?Checkout
app/Livewire/Storefront/Checkout/Show.php:287:        $checkout = Checkout::withoutGlobalScopes()
app/Livewire/Storefront/Checkout/Show.php:293:        if (! $checkout instanceof Checkout) {
app/Livewire/Storefront/Checkout/Show.php:294:            $checkout = app(CheckoutService::class)->createFromCart($cart, $this->customer());
app/Livewire/Storefront/Checkout/Show.php:297:        $checkout = $this->syncSessionDiscount($checkout);
app/Livewire/Storefront/Checkout/Show.php:299:        return $checkout->load(['cart.lines.variant.product', 'cart.lines.variant.optionValues.option']);
app/Livewire/Storefront/Checkout/Show.php:364:        return $this->checkout()?->totals_json ?? [
app/Livewire/Storefront/Checkout/Show.php:376:        return view('livewire.storefront.checkout.show', [
app/Livewire/Storefront/Checkout/Show.php:378:            'checkout' => $this->checkout(),
app/Livewire/Storefront/Checkout/Show.php:397:    private function fillFromCheckout(?Checkout $checkout): void
app/Livewire/Storefront/Checkout/Show.php:399:        if (! $checkout instanceof Checkout) {
app/Livewire/Storefront/Checkout/Show.php:403:        $this->email = $checkout->email ?: $this->email;
app/Livewire/Storefront/Checkout/Show.php:404:        $this->shippingAddress = array_replace($this->shippingAddress, $checkout->shipping_address_json ?? []);
app/Livewire/Storefront/Checkout/Show.php:405:        $this->billingAddress = array_replace($this->billingAddress, $checkout->billing_address_json ?? []);
app/Livewire/Storefront/Checkout/Show.php:406:        $this->selectedShippingRateId = $checkout->shipping_method_id;
app/Livewire/Storefront/Checkout/Show.php:407:        $this->discountCode = (string) ($checkout->discount_code ?? '');
app/Livewire/Storefront/Checkout/Show.php:408:        $this->paymentMethod = (string) ($checkout->payment_method ?? $this->paymentMethod);
app/Livewire/Storefront/Checkout/Show.php:409:        $this->step = match ($checkout->status) {
app/Livewire/Storefront/Checkout/Show.php:418:    private function syncSessionDiscount(Checkout $checkout): Checkout
app/Livewire/Storefront/Checkout/Show.php:422:        if ($code === '' || $checkout->discount_code !== null) {
app/Livewire/Storefront/Checkout/Show.php:423:            return $checkout;
app/Livewire/Storefront/Checkout/Show.php:426:        $checkout->forceFill(['discount_code' => $code])->save();
app/Livewire/Storefront/Checkout/Show.php:429:            app(PricingEngine::class)->calculate($checkout);
app/Livewire/Storefront/Checkout/Show.php:431:            $checkout->forceFill(['discount_code' => null])->save();
app/Livewire/Storefront/Checkout/Show.php:433:            app(PricingEngine::class)->calculate($checkout);
app/Livewire/Storefront/Checkout/Show.php:436:        return $checkout->refresh();
app/Providers/AppServiceProvider.php:99:        RateLimiter::for('checkout', function (Request $request): Limit {
app/Livewire/Settings/Profile.php:50:     * Send an email verification notification to the current user.


command: sed -n '1,180p' app/Models/StoreSettings.php && sed -n '1,220p' database/migrations/*create_store_settings_table.php

StoreSettings.php

cmd: sed -n '1,220p' 'database/migrations/*create_store_settings_table.php'

aggregated_output:
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class StoreSettings extends Model
{
    /** @use HasFactory<\Database\Factories\StoreSettingsFactory> */
    use HasFactory;

    public $incrementing = false;

    public const CREATED_AT = null;

    protected $primaryKey = 'store_id';

    /**
     * @var list<string>
     */
    protected $fillable = [
        'store_id',
        'settings_json',
    ];

    /**
     * @return BelongsTo<Store, $this>
     */
    public function store(): BelongsTo
    {
        return $this->belongsTo(Store::class);
    }

    /**
     * @return array<string, string>
     */
    protected function casts(): array
    {
        return [
            'settings_json' => 'array',
        ];
    }
}
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('store_settings', function (Blueprint $table) {
            $table->foreignId('store_id')->primary()->constrained()->cascadeOnDelete();
            $table->text('settings_json')->default('{}');
            $table->timestamp('updated_at')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('store_settings');
    }
};