stdout:
Success. Updated the following files:
A /Users/fabianwesner/Herd/shop/tests/Feature/Api/StorefrontOrderApiTest.php
D /Users/fabianwesner/Herd/shop/tests/Feature/Api/StorefrontOrderApiTest.php

type: add

content:
<?php

use App\Enums\CheckoutStatus;
use App\Models\Checkout;
use App\Models\InventoryItem;
use App\Models\Product;
use App\Models\ProductVariant;
use App\Models\Store;
use Database\Seeders\DatabaseSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

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

function storefrontOrderApiStore(): Store
{
    return Store::query()->where('handle', 'acme-fashion')->firstOrFail();
}

function storefrontOrderApiVariant(Store $store): ProductVariant
{
    $product = Product::withoutGlobalScopes()
        ->where('store_id', $store->getKey())
        ->where('handle', 'classic-cotton-t-shirt')
        ->firstOrFail();

    $variant = ProductVariant::withoutGlobalScopes()
        ->where('product_id', $product->getKey())
        ->oldest('position')
        ->firstOrFail();

    InventoryItem::withoutGlobalScopes()
        ->where('variant_id', $variant->getKey())
        ->update([
            'quantity_on_hand' => 20,
            'quantity_reserved' => 0,
        ]);

    return $variant->refresh();
}

/**
 * @return array{0: int, 1: ProductVariant}
 */
function storefrontOrderApiCheckout(string $remoteAddress = '10.0.0.41'): array
{
    $store = storefrontOrderApiStore();
    $variant = storefrontOrderApiVariant($store);
    $api = fn () => test()->withServerVariables(['REMOTE_ADDR' => $remoteAddress])->withHeader('Host', 'shop.test');

    $cartId = $api()
        ->postJson('/api/storefront/v1/carts')
        ->assertCreated()['data']['id'];

    $api()
        ->postJson("/api/storefront/v1/carts/{$cartId}/lines", [
            'variant_id' => $variant->getKey(),
            'quantity' => 1,
        ])
        ->assertCreated();

    $checkoutId = $api()
        ->postJson('/api/storefront/v1/checkouts', [
            'cart_id' => $cartId,
            'email' => 'buyer@example.test',
        ])
        ->assertCreated()['data']['id'];

    $addressResponse = $api()
        ->putJson("/api/storefront/v1/checkouts/{$checkoutId}/address", [
            'shipping_address' => [
                'first_name' => 'Test',
                'last_name' => 'Buyer',
                'address1' => 'Main Street 1',
                'city' => 'Berlin',
                'country' => 'DE',
                'postal_code' => '10115',
            ],
        ])
        ->assertOk();

    $api()
        ->putJson("/api/storefront/v1/checkouts/{$checkoutId}/shipping-method", [
            'shipping_rate_id' => $addressResponse['data']['available_shipping_rates'][0]['id'],
        ])
        ->assertOk();

    return [$checkoutId, $variant];
}

test('storefront order api pays a checkout and exposes token-gated order lookup', function (): void {
    [$checkoutId] = storefrontOrderApiCheckout();
    $api = fn () => $this->withServerVariables(['REMOTE_ADDR' => '10.0.0.41'])->withHeader('Host', 'shop.test');

    $payResponse = $api()
        ->postJson("/api/storefront/v1/checkouts/{$checkoutId}/pay", [
            'payment_method' => 'credit_card',
            'card_number' => '4242 4242 4242 4242',
            'card_holder' => 'Test Buyer',
            'card_expiry' => '12/30',
            'card_cvc' => '123',
        ]);

    $payResponse
        ->assertOk()
        ->assertJsonPath('data.order_number', '#1001')
        ->assertJsonPath('data.financial_status', 'paid')
        ->assertJsonCount(1, 'data.lines');

    $token = $payResponse['data']['access_token'];

    $api()
        ->getJson('/api/storefront/v1/orders/%231001?token='.$token)
        ->assertOk()
        ->assertJsonPath('data.order_number', '#1001')
        ->assertJsonPath('data.total_amount', $payResponse['data']['total_amount']);

    $api()
        ->getJson('/api/storefront/v1/orders/%231001?token=bad-token')
        ->assertNotFound();
});

test('storefront order api returns payment failures and releases reservations', function (): void {
    [$checkoutId, $variant] = storefrontOrderApiCheckout('10.0.0.42');
    $api = fn () => $this->withServerVariables(['REMOTE_ADDR' => '10.0.0.42'])->withHeader('Host', 'shop.test');

    $api()
        ->postJson("/api/storefront/v1/checkouts/{$checkoutId}/pay", [
            'payment_method' => 'credit_card',
            'card_number' => '4000 0000 0000 0002',
            'card_holder' => 'Test Buyer',
            'card_expiry' => '12/30',
            'card_cvc' => '123',
        ])
        ->assertStatus(402);

    $checkout = Checkout::withoutGlobalScopes()->findOrFail($checkoutId);
    $inventory = InventoryItem::withoutGlobalScopes()->where('variant_id', $variant->getKey())->firstOrFail();

    expect($checkout->status)->toBe(CheckoutStatus::ShippingSelected)
        ->and($inventory->quantity_reserved)->toBe(0);
});


output: {"output":"Success. Updated the following files:\nA /Users/fabianwesner/Herd/shop/tests/Feature/Api/StorefrontOrderApiTest.php\nD /Users/fabianwesner/Herd/shop/tests/Feature/Api/StorefrontOrderApiTest.php\n","metadata":{"exit_code":0,"duration_seconds":0.0}}


status: completed

input:
*** Begin Patch
*** Update File: /Users/fabianwesner/Herd/shop/tests/Feature/Api/StorefrontOrderApiTest.php
@@
-function storefrontOrderApiCheckout(string $remoteAddress = '10.0.0.41'): array
+function storefrontOrderApiCheckout(object $testCase, string $remoteAddress = '10.0.0.41'): array
 {
     $store = storefrontOrderApiStore();
     $variant = storefrontOrderApiVariant($store);
-    $api = fn () => test()->withServerVariables(['REMOTE_ADDR' => $remoteAddress])->withHeader('Host', 'shop.test');
+    $api = fn () => $testCase->withServerVariables(['REMOTE_ADDR' => $remoteAddress])->withHeader('Host', 'shop.test');
@@
 test('storefront order api pays a checkout and exposes token-gated order lookup', function (): void {
-    [$checkoutId] = storefrontOrderApiCheckout();
+    [$checkoutId] = storefrontOrderApiCheckout($this);
@@
 test('storefront order api returns payment failures and releases reservations', function (): void {
-    [$checkoutId, $variant] = storefrontOrderApiCheckout('10.0.0.42');
+    [$checkoutId, $variant] = storefrontOrderApiCheckout($this, '10.0.0.42');
*** End Patch


stdout:
Success. Updated the following files:
M /Users/fabianwesner/Herd/shop/tests/Feature/Api/StorefrontOrderApiTest.php

type: update

unified_diff:
@@ -48,3 +48,3 @@
  */
-function storefrontOrderApiCheckout(string $remoteAddress = '10.0.0.41'): array
+function storefrontOrderApiCheckout(object $testCase, string $remoteAddress = '10.0.0.41'): array
 {
@@ -52,3 +52,3 @@
     $variant = storefrontOrderApiVariant($store);
-    $api = fn () => test()->withServerVariables(['REMOTE_ADDR' => $remoteAddress])->withHeader('Host', 'shop.test');
+    $api = fn () => $testCase->withServerVariables(['REMOTE_ADDR' => $remoteAddress])->withHeader('Host', 'shop.test');

@@ -95,3 +95,3 @@
 test('storefront order api pays a checkout and exposes token-gated order lookup', function (): void {
-    [$checkoutId] = storefrontOrderApiCheckout();
+    [$checkoutId] = storefrontOrderApiCheckout($this);
     $api = fn () => $this->withServerVariables(['REMOTE_ADDR' => '10.0.0.41'])->withHeader('Host', 'shop.test');
@@ -127,3 +127,3 @@
 test('storefront order api returns payment failures and releases reservations', function (): void {
-    [$checkoutId, $variant] = storefrontOrderApiCheckout('10.0.0.42');
+    [$checkoutId, $variant] = storefrontOrderApiCheckout($this, '10.0.0.42');
     $api = fn () => $this->withServerVariables(['REMOTE_ADDR' => '10.0.0.42'])->withHeader('Host', 'shop.test');

status: completed


output: {"output":"Success. Updated the following files:\nM /Users/fabianwesner/Herd/shop/tests/Feature/Api/StorefrontOrderApiTest.php\n","metadata":{"exit_code":0,"duration_seconds":0.0}}


status: completed

input:
*** Begin Patch
*** Delete File: /Users/fabianwesner/Herd/shop/tests/Feature/Api/AdminOrderApiTest.php
*** Add File: /Users/fabianwesner/Herd/shop/tests/Feature/Api/AdminOrderApiTest.php
+<?php
+
+use App\Enums\FinancialStatus;
+use App\Enums\FulfillmentStatus;
+use App\Enums\OrderStatus;
+use App\Enums\PaymentStatus;
+use App\Models\Fulfillment;
+use App\Models\InventoryItem;
+use App\Models\Order;
+use App\Models\OrderLine;
+use App\Models\Payment;
+use App\Models\Product;
+use App\Models\ProductVariant;
+use App\Models\Store;
+use App\Models\User;
+use Database\Seeders\DatabaseSeeder;
+use Illuminate\Foundation\Testing\RefreshDatabase;
+
+uses(RefreshDatabase::class);
+
+beforeEach(function (): void {
+    $this->withoutVite();
+    $this->seed(DatabaseSeeder::class);
+});
+
+function adminOrderApiStore(): Store
+{
+    return Store::query()->where('handle', 'acme-fashion')->firstOrFail();
+}
+
+function adminOrderApiUser(): User
+{
+    return User::query()->where('email', 'admin@acme.test')->firstOrFail();
+}
+
+/**
+ * @return array{0: Order, 1: OrderLine, 2: ProductVariant}
+ */
+function adminOrderApiOrder(Store $store, array $orderAttributes = [], int $quantity = 2, int $unitPrice = 2500): array
+{
+    $product = Product::factory()
+        ->withDefaultVariant($unitPrice)
+        ->create(['store_id' => $store->getKey()]);
+    $variant = ProductVariant::withoutGlobalScopes()
+        ->where('product_id', $product->getKey())
+        ->firstOrFail();
+
+    InventoryItem::withoutGlobalScopes()
+        ->where('variant_id', $variant->getKey())
+        ->update([
+            'quantity_on_hand' => 10,
+            'quantity_reserved' => 0,
+        ]);
+
+    $total = $quantity * $unitPrice;
+    $order = Order::factory()->paid()->create(array_merge([
+        'store_id' => $store->getKey(),
+        'subtotal_amount' => $total,
+        'shipping_amount' => 0,
+        'tax_amount' => 0,
+        'total_amount' => $total,
+        'email' => 'buyer@example.test',
+    ], $orderAttributes));
+    $line = OrderLine::factory()->create([
+        'order_id' => $order->getKey(),
+        'product_id' => $product->getKey(),
+        'variant_id' => $variant->getKey(),
+        'title_snapshot' => 'Admin API Product',
+        'sku_snapshot' => 'ADMIN-API-001',
+        'quantity' => $quantity,
+        'unit_price_amount' => $unitPrice,
+        'total_amount' => $total,
+    ]);
+
+    Payment::factory()->create([
+        'order_id' => $order->getKey(),
+        'status' => $order->financial_status === FinancialStatus::Pending ? PaymentStatus::Pending : PaymentStatus::Captured,
+        'amount' => $total,
+        'currency' => $order->currency,
+    ]);
+
+    return [$order, $line, $variant];
+}
+
+test('admin order api lists and shows store scoped orders', function (): void {
+    $store = adminOrderApiStore();
+    [$order] = adminOrderApiOrder($store, [
+        'order_number' => '#8001',
+        'email' => 'alpha@example.test',
+    ]);
+    $otherStore = Store::factory()->create();
+    adminOrderApiOrder($otherStore, [
+        'order_number' => '#9001',
+        'email' => 'other@example.test',
+    ]);
+
+    $this->getJson("/api/admin/v1/stores/{$store->getKey()}/orders")
+        ->assertUnauthorized();
+
+    $this->actingAs(adminOrderApiUser())
+        ->getJson("/api/admin/v1/stores/{$store->getKey()}/orders?query=alpha")
+        ->assertOk()
+        ->assertJsonPath('data.0.order_number', '#8001')
+        ->assertJsonMissing(['order_number' => '#9001']);
+
+    $this->actingAs(adminOrderApiUser())
+        ->getJson("/api/admin/v1/stores/{$store->getKey()}/orders/{$order->getKey()}")
+        ->assertOk()
+        ->assertJsonPath('data.order_number', '#8001')
+        ->assertJsonPath('data.lines.0.title', 'Admin API Product');
+});
+
+test('admin order api creates refunds and fulfillments', function (): void {
+    $store = adminOrderApiStore();
+    [$order, $line] = adminOrderApiOrder($store, quantity: 2, unitPrice: 2500);
+    $user = adminOrderApiUser();
+
+    $this->actingAs($user)
+        ->postJson("/api/admin/v1/stores/{$store->getKey()}/orders/{$order->getKey()}/refunds", [
+            'amount' => 1000,
+            'reason' => 'Customer return',
+        ])
+        ->assertCreated()
+        ->assertJsonPath('data.amount', 1000)
+        ->assertJsonPath('data.status', 'processed');
+
+    expect($order->refresh()->financial_status)->toBe(FinancialStatus::PartiallyRefunded);
+
+    $this->actingAs($user)
+        ->postJson("/api/admin/v1/stores/{$store->getKey()}/orders/{$order->getKey()}/fulfillments", [
+            'line_items' => [
+                ['order_line_id' => $line->getKey(), 'quantity' => 1],
+            ],
+            'tracking_company' => 'DHL',
+            'tracking_number' => 'DHL123',
+        ])
+        ->assertCreated()
+        ->assertJsonPath('data.status', 'pending')
+        ->assertJsonPath('data.lines.0.quantity', 1);
+
+    $fulfillment = Fulfillment::query()->where('order_id', $order->getKey())->firstOrFail();
+
+    expect($order->refresh()->fulfillment_status)->toBe(FulfillmentStatus::Partial)
+        ->and($fulfillment->tracking_number)->toBe('DHL123');
+});
+
+test('admin order api rejects orders outside the requested store', function (): void {
+    $store = adminOrderApiStore();
+    $otherStore = Store::factory()->create();
+    [$otherOrder] = adminOrderApiOrder($otherStore, [
+        'order_number' => '#9001',
+    ]);
+
+    $this->actingAs(adminOrderApiUser())
+        ->getJson("/api/admin/v1/stores/{$store->getKey()}/orders/{$otherOrder->getKey()}")
+        ->assertNotFound();
+});
*** End Patch


stdout:
Success. Updated the following files:
A /Users/fabianwesner/Herd/shop/tests/Feature/Api/AdminOrderApiTest.php
D /Users/fabianwesner/Herd/shop/tests/Feature/Api/AdminOrderApiTest.php

content:
<?php

use App\Enums\FinancialStatus;
use App\Enums\FulfillmentStatus;
use App\Enums\OrderStatus;
use App\Enums\PaymentStatus;
use App\Models\Fulfillment;
use App\Models\InventoryItem;
use App\Models\Order;
use App\Models\OrderLine;
use App\Models\Payment;
use App\Models\Product;
use App\Models\ProductVariant;
use App\Models\Store;
use App\Models\User;
use Database\Seeders\DatabaseSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

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

function adminOrderApiStore(): Store
{
    return Store::query()->where('handle', 'acme-fashion')->firstOrFail();
}

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

/**
 * @return array{0: Order, 1: OrderLine, 2: ProductVariant}
 */
function adminOrderApiOrder(Store $store, array $orderAttributes = [], int $quantity = 2, int $unitPrice = 2500): array
{
    $product = Product::factory()
        ->withDefaultVariant($unitPrice)
        ->create(['store_id' => $store->getKey()]);
    $variant = ProductVariant::withoutGlobalScopes()
        ->where('product_id', $product->getKey())
        ->firstOrFail();

    InventoryItem::withoutGlobalScopes()
        ->where('variant_id', $variant->getKey())
        ->update([
            'quantity_on_hand' => 10,
            'quantity_reserved' => 0,
        ]);

    $total = $quantity * $unitPrice;
    $order = Order::factory()->paid()->create(array_merge([
        'store_id' => $store->getKey(),
        'subtotal_amount' => $total,
        'shipping_amount' => 0,
        'tax_amount' => 0,
        'total_amount' => $total,
        'email' => 'buyer@example.test',
    ], $orderAttributes));
    $line = OrderLine::factory()->create([
        'order_id' => $order->getKey(),
        'product_id' => $product->getKey(),
        'variant_id' => $variant->getKey(),
        'title_snapshot' => 'Admin API Product',
        'sku_snapshot' => 'ADMIN-API-001',
        'quantity' => $quantity,
        'unit_price_amount' => $unitPrice,
        'total_amount' => $total,
    ]);

    Payment::factory()->create([
        'order_id' => $order->getKey(),
        'status' => $order->financial_status === FinancialStatus::Pending ? PaymentStatus::Pending : PaymentStatus::Captured,
        'amount' => $total,
        'currency' => $order->currency,
    ]);

    return [$order, $line, $variant];
}

test('admin order api lists and shows store scoped orders', function (): void {
    $store = adminOrderApiStore();
    [$order] = adminOrderApiOrder($store, [
        'order_number' => '#8001',
        'email' => 'alpha@example.test',
    ]);
    $otherStore = Store::factory()->create();
    adminOrderApiOrder($otherStore, [
        'order_number' => '#9001',
        'email' => 'other@example.test',
    ]);

    $this->getJson("/api/admin/v1/stores/{$store->getKey()}/orders")
        ->assertUnauthorized();

    $this->actingAs(adminOrderApiUser())
        ->getJson("/api/admin/v1/stores/{$store->getKey()}/orders?query=alpha")
        ->assertOk()
        ->assertJsonPath('data.0.order_number', '#8001')
        ->assertJsonMissing(['order_number' => '#9001']);

    $this->actingAs(adminOrderApiUser())
        ->getJson("/api/admin/v1/stores/{$store->getKey()}/orders/{$order->getKey()}")
        ->assertOk()
        ->assertJsonPath('data.order_number', '#8001')
        ->assertJsonPath('data.lines.0.title', 'Admin API Product');
});

test('admin order api creates refunds and fulfillments', function (): void {
    $store = adminOrderApiStore();
    [$order, $line] = adminOrderApiOrder($store, quantity: 2, unitPrice: 2500);
    $user = adminOrderApiUser();

    $this->actingAs($user)
        ->postJson("/api/admin/v1/stores/{$store->getKey()}/orders/{$order->getKey()}/refunds", [
            'amount' => 1000,
            'reason' => 'Customer return',
        ])
        ->assertCreated()
        ->assertJsonPath('data.amount', 1000)
        ->assertJsonPath('data.status', 'processed');

    expect($order->refresh()->financial_status)->toBe(FinancialStatus::PartiallyRefunded);

    $this->actingAs($user)
        ->postJson("/api/admin/v1/stores/{$store->getKey()}/orders/{$order->getKey()}/fulfillments", [
            'line_items' => [
                ['order_line_id' => $line->getKey(), 'quantity' => 1],
            ],
            'tracking_company' => 'DHL',
            'tracking_number' => 'DHL123',
        ])
        ->assertCreated()
        ->assertJsonPath('data.status', 'pending')
        ->assertJsonPath('data.lines.0.quantity', 1);

    $fulfillment = Fulfillment::query()->where('order_id', $order->getKey())->firstOrFail();

    expect($order->refresh()->fulfillment_status)->toBe(FulfillmentStatus::Partial)
        ->and($fulfillment->tracking_number)->toBe('DHL123');
});

test('admin order api rejects orders outside the requested store', function (): void {
    $store = adminOrderApiStore();
    $otherStore = Store::factory()->create();
    [$otherOrder] = adminOrderApiOrder($otherStore, [
        'order_number' => '#9001',
    ]);

    $this->actingAs(adminOrderApiUser())
        ->getJson("/api/admin/v1/stores/{$store->getKey()}/orders/{$otherOrder->getKey()}")
        ->assertNotFound();
});


output: {"output":"Success. Updated the following files:\nA /Users/fabianwesner/Herd/shop/tests/Feature/Api/AdminOrderApiTest.php\nD /Users/fabianwesner/Herd/shop/tests/Feature/Api/AdminOrderApiTest.php\n","metadata":{"exit_code":0,"duration_seconds":0.0}}


cmd: sed -n '1,80p' app/Enums/RefundStatus.php


command: sed -n '1,80p' app/Enums/RefundStatus.php

RefundStatus.php

type: read

aggregated_output:
<?php

namespace App\Enums;

enum RefundStatus: string
{
    case Pending = 'pending';
    case Processed = 'processed';
    case Failed = 'failed';
}


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

namespace App\Enums;

enum RefundStatus: string
{
    case Pending = 'pending';
    case Processed = 'processed';
    case Failed = 'failed';
}


cmd: rg -n "RateLimiter|api.storefront|checkout" app bootstrap routes config -g '*.php'


command: rg -n "RateLimiter|api.storefront|checkout" app bootstrap routes config -g '*.php'

type: search

cmd: rg -n 'RateLimiter|api.storefront|checkout' app bootstrap routes config -g '*.php'

query: RateLimiter|api.storefront|checkout

path: app

aggregated_output:
app/Providers/FortifyServiceProvider.php:9:use Illuminate\Support\Facades\RateLimiter;
app/Providers/FortifyServiceProvider.php:61:        RateLimiter::for('two-factor', function (Request $request) {
app/Providers/FortifyServiceProvider.php:65:        RateLimiter::for('login', function (Request $request) {
routes/web.php:33:    Route::livewire('checkout', StorefrontCheckoutShow::class)->name('checkout.show');
routes/web.php:34:    Route::livewire('checkout/confirmation/{order}', StorefrontCheckoutConfirmation::class)->name('checkout.confirmation');
app/Providers/AppServiceProvider.php:18:use Illuminate\Support\Facades\RateLimiter;
app/Providers/AppServiceProvider.php:71:        RateLimiter::for('api.storefront', function (Request $request): Limit {
app/Providers/AppServiceProvider.php:75:        RateLimiter::for('checkout', function (Request $request): Limit {
app/Jobs/CleanupAbandonedCarts.php:20:    public function handle(CheckoutService $checkouts): void
app/Jobs/CleanupAbandonedCarts.php:27:            ->each(function (Cart $cart) use ($checkouts): void {
app/Jobs/CleanupAbandonedCarts.php:32:                    ->each(fn (Checkout $checkout): Checkout => $checkouts->expireCheckout($checkout));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:31:    public function store(StoreCheckoutRequest $request, CheckoutService $checkouts, PricingEngine $pricing): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:36:            $checkout = $checkouts->createFromCart($cart);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:37:            $checkout->forceFill([
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:40:            $pricing->calculate($checkout);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:43:                $checkout->refresh(),
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:50:    public function show(Checkout $checkout): CheckoutResource
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:52:        return CheckoutResource::make($this->loadCheckout($checkout));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:55:    public function address(SetCheckoutAddressRequest $request, Checkout $checkout, CheckoutService $checkouts): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:58:        $addressData['email'] ??= $checkout->email;
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:61:            return CheckoutResource::make($this->loadCheckout($checkouts->setAddress($checkout, $addressData)));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:67:    public function shippingMethod(SetCheckoutShippingRequest $request, Checkout $checkout, CheckoutService $checkouts): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:70:            return CheckoutResource::make($this->loadCheckout($checkouts->setShippingMethod(
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:71:                $checkout,
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:79:    public function applyDiscount(ApplyCheckoutDiscountRequest $request, Checkout $checkout, PricingEngine $pricing): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:81:        $checkout->forceFill([
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:86:            $pricing->calculate($checkout);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:88:            return CheckoutResource::make($this->loadCheckout($checkout->refresh()));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:90:            $checkout->forceFill(['discount_code' => null])->save();
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:91:            $pricing->calculate($checkout);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:100:    public function destroyDiscount(Checkout $checkout, PricingEngine $pricing): CheckoutResource
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:102:        abort_if($checkout->discount_code === null, 404);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:104:        $checkout->forceFill(['discount_code' => null])->save();
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:105:        $pricing->calculate($checkout);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:107:        return CheckoutResource::make($this->loadCheckout($checkout->refresh()));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:110:    public function paymentMethod(SelectCheckoutPaymentRequest $request, Checkout $checkout, CheckoutService $checkouts): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:113:            return CheckoutResource::make($this->loadCheckout($checkouts->selectPaymentMethod(
app/Http/Controllers/Api/Storefront/V1/Check…18504 chars truncated…class)->setAddress($checkout, [
app/Livewire/Storefront/Checkout/Show.php:116:                app(CheckoutService::class)->setShippingMethod($checkout, null);
app/Livewire/Storefront/Checkout/Show.php:132:        $checkout = $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();


output:
Chunk ID: 14401e
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 7126
Output:
app/Providers/FortifyServiceProvider.php:9:use Illuminate\Support\Facades\RateLimiter;
app/Providers/FortifyServiceProvider.php:61:        RateLimiter::for('two-factor', function (Request $request) {
app/Providers/FortifyServiceProvider.php:65:        RateLimiter::for('login', function (Request $request) {
routes/web.php:33:    Route::livewire('checkout', StorefrontCheckoutShow::class)->name('checkout.show');
routes/web.php:34:    Route::livewire('checkout/confirmation/{order}', StorefrontCheckoutConfirmation::class)->name('checkout.confirmation');
app/Providers/AppServiceProvider.php:18:use Illuminate\Support\Facades\RateLimiter;
app/Providers/AppServiceProvider.php:71:        RateLimiter::for('api.storefront', function (Request $request): Limit {
app/Providers/AppServiceProvider.php:75:        RateLimiter::for('checkout', function (Request $request): Limit {
app/Jobs/CleanupAbandonedCarts.php:20:    public function handle(CheckoutService $checkouts): void
app/Jobs/CleanupAbandonedCarts.php:27:            ->each(function (Cart $cart) use ($checkouts): void {
app/Jobs/CleanupAbandonedCarts.php:32:                    ->each(fn (Checkout $checkout): Checkout => $checkouts->expireCheckout($checkout));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:31:    public function store(StoreCheckoutRequest $request, CheckoutService $checkouts, PricingEngine $pricing): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:36:            $checkout = $checkouts->createFromCart($cart);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:37:            $checkout->forceFill([
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:40:            $pricing->calculate($checkout);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:43:                $checkout->refresh(),
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:50:    public function show(Checkout $checkout): CheckoutResource
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:52:        return CheckoutResource::make($this->loadCheckout($checkout));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:55:    public function address(SetCheckoutAddressRequest $request, Checkout $checkout, CheckoutService $checkouts): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:58:        $addressData['email'] ??= $checkout->email;
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:61:            return CheckoutResource::make($this->loadCheckout($checkouts->setAddress($checkout, $addressData)));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:67:    public function shippingMethod(SetCheckoutShippingRequest $request, Checkout $checkout, CheckoutService $checkouts): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:70:            return CheckoutResource::make($this->loadCheckout($checkouts->setShippingMethod(
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:71:                $checkout,
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:79:    public function applyDiscount(ApplyCheckoutDiscountRequest $request, Checkout $checkout, PricingEngine $pricing): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:81:        $checkout->forceFill([
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:86:            $pricing->calculate($checkout);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:88:            return CheckoutResource::make($this->loadCheckout($checkout->refresh()));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:90:            $checkout->forceFill(['discount_code' => null])->save();
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:91:            $pricing->calculate($checkout);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:100:    public function destroyDiscount(Checkout $checkout, PricingEngine $pricing): CheckoutResource
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:102:        abort_if($checkout->discount_code === null, 404);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:104:        $checkout->forceFill(['discount_code' => null])->save();
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:105:        $pricing->calculate($checkout);
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:107:        return CheckoutResource::make($this->loadCheckout($checkout->refresh()));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:110:    public function paymentMethod(SelectCheckoutPaymentRequest $request, Checkout $checkout, CheckoutService $checkouts): CheckoutResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:113:            return CheckoutResource::make($this->loadCheckout($checkouts->selectPaymentMethod(
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:114:                $checkout,
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:122:    public function pay(CompleteCheckoutPaymentRequest $request, Checkout $checkout, CheckoutService $checkouts): OrderResource|JsonResponse
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:125:            if ($checkout->payment_method !== $request->validated('payment_method')) {
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:126:                $checkout = $checkouts->selectPaymentMethod($checkout, (string) $request->validated('payment_method'));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:129:            $order = $checkouts->completeCheckout($checkout, [
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:144:    private function loadCheckout(Checkout $checkout): Checkout
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:146:        $checkout = $checkout->load([
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:152:        $checkout->setRelation('availableRates', $this->availableRates($checkout));
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:154:        return $checkout;
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:165:    private function availableRates(Checkout $checkout): Collection
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:167:        if (! is_array($checkout->shipping_address_json) || $checkout->shipping_address_json === []) {
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:172:            ->getAvailableRates($checkout->store, $checkout->shipping_address_json)
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:173:            ->map(function (ShippingRate $rate) use ($checkout): ShippingRate {
app/Http/Controllers/Api/Storefront/V1/CheckoutController.php:174:                $rate->setAttribute('calculated_amount', app(ShippingCalculator::class)->calculate($rate, $checkout->cart));
app/Contracts/PaymentProvider.php:16:    public function charge(Checkout $checkout, PaymentMethod $method, array $paymentMethodData = []): PaymentResult;
routes/api.php:14:    ->name('api.storefront.v1.')
routes/api.php:16:        Route::middleware('throttle:api.storefront')->group(function (): void {
routes/api.php:24:        Route::middleware('throttle:checkout')->group(function (): void {
routes/api.php:25:            Route::post('checkouts', [CheckoutController::class, 'store'])->name('checkouts.store');
routes/api.php:26:            Route::get('checkouts/{checkout}', [CheckoutController::class, 'show'])->name('checkouts.show');
routes/api.php:27:            Route::put('checkouts/{checkout}/address', [CheckoutController::class, 'address'])->name('checkouts.address');
routes/api.php:28:            Route::put('checkouts/{checkout}/shipping-method', [CheckoutController::class, 'shippingMethod'])->name('checkouts.shipping-method');
routes/api.php:29:            Route::post('checkouts/{checkout}/apply-discount', [CheckoutController::class, 'applyDiscount'])->name('checkouts.apply-discount');
routes/api.php:30:            Route::delete('checkouts/{checkout}/discount', [CheckoutController::class, 'destroyDiscount'])->name('checkouts.discount.destroy');
routes/api.php:31:            Route::put('checkouts/{checkout}/payment-method', [CheckoutController::class, 'paymentMethod'])->name('checkouts.payment-method');
routes/api.php:32:            Route::post('checkouts/{checkout}/pay', [CheckoutController::class, 'pay'])->name('checkouts.pay');
app/Jobs/ExpireAbandonedCheckouts.php:18:    public function handle(CheckoutService $checkouts): void
app/Jobs/ExpireAbandonedCheckouts.php:33:            ->each(fn (Checkout $checkout): Checkout => $checkouts->expireCheckout($checkout));
bootstrap/cache/services.php:85:    'Illuminate\\Cache\\RateLimiter' => 'Illuminate\\Cache\\CacheServiceProvider',
app/Services/PricingEngine.php:22:    public function calculate(Checkout $checkout): PricingResult
app/Services/PricingEngine.php:24:        return DB::transaction(function () use ($checkout): PricingResult {
app/Services/PricingEngine.php:25:            $checkout = Checkout::withoutGlobalScopes()
app/Services/PricingEngine.php:27:                ->whereKey($checkout->getKey())
app/Services/PricingEngine.php:29:            $cart = $checkout->cart;
app/Services/PricingEngine.php:31:            $this->resetLineAmounts($checkout);
app/Services/PricingEngine.php:40:            if ($checkout->discount_code) {
app/Services/PricingEngine.php:41:                $discount = $this->discounts->validate($checkout->discount_code, $checkout->store, $cart);
app/Services/PricingEngine.php:49:            $shippingAmount = $this->shippingAmount($checkout, $discountResult);
app/Services/PricingEngine.php:50:            $taxSettings = $this->taxSettings($checkout);
app/Services/PricingEngine.php:55:                $checkout->shipping_address_json ?? [],
app/Services/PricingEngine.php:72:            $checkout->forceFill([
app/Services/PricingEngine.php:81:    private function resetLineAmounts(Checkout $checkout): void
app/Services/PricingEngine.php:84:            ->where('cart_id', $checkout->cart_id)
app/Services/PricingEngine.php:97:    private function shippingAmount(Checkout $checkout, DiscountResult $discountResult): int
app/Services/PricingEngine.php:99:        if (! $this->shipping->requiresShipping($checkout->cart)) {
app/Services/PricingEngine.php:103:        if ($checkout->shipping_method_id === null) {
app/Services/PricingEngine.php:107:        $rate = ShippingRate::withoutGlobalScopes()->find($checkout->shipping_method_id);
app/Services/PricingEngine.php:113:        $amount = $this->shipping->calculate($rate, $checkout->cart);
app/Services/PricingEngine.php:122:    private function taxSettings(Checkout $checkout): TaxSettings
app/Services/PricingEngine.php:125:            ->where('store_id', $checkout->store_id)
app/Services/PricingEngine.php:127:                'store_id' => $checkout->store_id,
app/Services/ThemeSettingsService.php:63:                'tagline' => 'A self-contained demo storefront with scoped catalog data and checkout-ready products.',
app/Services/CheckoutService.php:51:    public function setAddress(Checkout $checkout, array $addressData): Checkout
app/Services/CheckoutService.php:53:        return DB::transaction(function () use ($checkout, $addressData): Checkout {
app/Services/CheckoutService.php:54:            $checkout = $this->freshCheckout($checkout);
app/Services/CheckoutService.php:55:            $this->assertStatus($checkout, [CheckoutStatus::Started, CheckoutStatus::Addressed]);
app/Services/CheckoutService.php:73:            $checkout->forceFill([
app/Services/CheckoutService.php:80:            $this->pricing->calculate($checkout);
app/Services/CheckoutService.php:82:            return $checkout->refresh();
app/Services/CheckoutService.php:86:    public function setShippingMethod(Checkout $checkout, ?int $shippingRateId): Checkout
app/Services/CheckoutService.php:88:        return DB::transaction(function () use ($checkout, $shippingRateId): Checkout {
app/Services/CheckoutService.php:89:            $checkout = $this->freshCheckout($checkout);
app/Services/CheckoutService.php:90:            $this->assertStatus($checkout, [CheckoutStatus::Addressed, CheckoutStatus::ShippingSelected]);
app/Services/CheckoutService.php:92:            if (! $this->shipping->requiresShipping($checkout->cart)) {
app/Services/CheckoutService.php:93:                $checkout->forceFill([
app/Services/CheckoutService.php:98:                $this->pricing->calculate($checkout);
app/Services/CheckoutService.php:100:                return $checkout->refresh();
app/Services/CheckoutService.php:103:            $availableRates = $this->shipping->getAvailableRates($checkout->store, $checkout->shipping_address_json ?? []);
app/Services/CheckoutService.php:115:            $checkout->forceFill([
app/Services/CheckoutService.php:120:            $this->pricing->calculate($checkout);
app/Services/CheckoutService.php:122:            return $checkout->refresh();
app/Services/CheckoutService.php:126:    public function selectPaymentMethod(Checkout $checkout, string $paymentMethod): Checkout
app/Services/CheckoutService.php:128:        return DB::transaction(function () use ($checkout, $paymentMethod): Checkout {
app/Services/CheckoutService.php:129:            $checkout = $this->freshCheckout($checkout);
app/Services/CheckoutService.php:131:            if ($checkout->status === CheckoutStatus::PaymentSelected) {
app/Services/CheckoutService.php:132:                return $checkout;
app/Services/CheckoutService.php:135:            $this->assertStatus($checkout, [CheckoutStatus::ShippingSelected]);
app/Services/CheckoutService.php:141:            if ($checkout->totals_json === null) {
app/Services/CheckoutService.php:142:                $this->pricing->calculate($checkout);
app/Services/CheckoutService.php:146:                ->where('cart_id', $checkout->cart_id)
app/Services/CheckoutService.php:156:            $checkout->forceFill([
app/Services/CheckoutService.php:162:            return $checkout->refresh();
app/Services/CheckoutService.php:166:    public function expireCheckout(Checkout $checkout): Checkout
app/Services/CheckoutService.php:168:        return DB::transaction(function () use ($checkout): Checkout {
app/Services/CheckoutService.php:169:            $checkout = $this->freshCheckout($checkout);
app/Services/CheckoutService.php:171:            if (in_array($checkout->status, [CheckoutStatus::Completed, CheckoutStatus::Expired], true)) {
app/Services/CheckoutService.php:172:                return $checkout;
app/Services/CheckoutService.php:175:            if ($checkout->status === CheckoutStatus::PaymentSelected) {
app/Services/CheckoutService.php:177:                    ->where('cart_id', $checkout->cart_id)
app/Services/CheckoutService.php:188:            $checkout->forceFill([
app/Services/CheckoutService.php:192:            return $checkout->refresh();
app/Services/CheckoutService.php:199:    public function completeCheckout(Checkout $checkout, array $paymentMethodData = []): Order
app/Services/CheckoutService.php:201:        return $this->orders->createFromCheckout($checkout, $paymentMethodData);
app/Services/CheckoutService.php:204:    private function freshCheckout(Checkout $checkout): Checkout
app/Services/CheckoutService.php:208:            ->whereKey($checkout->getKey())
app/Services/CheckoutService.php:216:    private function assertStatus(Checkout $checkout, array $allowed): void
app/Services/CheckoutService.php:218:        if (! in_array($checkout->status, $allowed, true)) {
app/Services/CheckoutService.php:219:            throw InvalidCheckoutTransitionException::because("Checkout cannot transition from {$checkout->status->value}.");
app/Services/PaymentService.php:21:    public function charge(Checkout $checkout, PaymentMethod $method, array $paymentMethodData = []): PaymentResult
app/Services/PaymentService.php:23:        return $this->provider->charge($checkout, $method, $paymentMethodData);
app/Livewire/Admin/Auth/Login.php:6:use Illuminate\Support\Facades\RateLimiter;
app/Livewire/Admin/Auth/Login.php:28:        if (RateLimiter::tooManyAttempts($key, 5)) {
app/Livewire/Admin/Auth/Login.php:31:                    'seconds' => RateLimiter::availableIn($key),
app/Livewire/Admin/Auth/Login.php:41:            RateLimiter::hit($key, 60);
app/Livewire/Admin/Auth/Login.php:48:        RateLimiter::clear($key);
app/Services/Payments/MockPaymentProvider.php:20:    public function charge(Checkout $checkout, PaymentMethod $method, array $paymentMethodData = []): PaymentResult
app/Services/OrderService.php:42:     * Create an order from a checkout after payment has been selected.
app/Services/OrderService.php:46:    public function createFromCheckout(Checkout $checkout, array $paymentMethodData = []): Order
app/Services/OrderService.php:49:            return DB::transaction(function () use ($checkout, $paymentMethodData): Order {
app/Services/OrderService.php:50:                $checkout = $this->freshCheckout($checkout);
app/Services/OrderService.php:52:                    ->where('checkout_id', $checkout->getKey())
app/Services/OrderService.php:59:                if ($checkout->status !== CheckoutStatus::PaymentSelected) {
app/Services/OrderService.php:60:                    throw InvalidCheckoutTransitionException::because("Checkout cannot transition from {$checkout->status->value}.");
app/Services/OrderService.php:63:                if ($checkout->totals_json === null) {
app/Services/OrderService.php:64:                    $this->pricing->calculate($checkout);
app/Services/OrderService.php:65:                    $checkout = $this->freshCheckout($checkout);
app/Services/OrderService.php:68:                $method = $this->paymentMethod($checkout);
app/Services/OrderService.php:69:                $paymentResult = $this->payments->charge($checkout, $method, $paymentMethodData);
app/Services/OrderService.php:76:                $totals = $checkout->totals_json ?? [];
app/Services/OrderService.php:79:                    'store_id' => $checkout->store_id,
app/Services/OrderService.php:80:                    'checkout_id' => $checkout->getKey(),
app/Services/OrderService.php:81:                    'customer_id' => $checkout->customer_id,
app/Services/OrderService.php:82:                    'order_number' => $this->nextOrderNumber($checkout->store),
app/Services/OrderService.php:87:                    'currency' => (string) data_get($totals, 'currency', $checkout->cart->currency),
app/Services/OrderService.php:93:                    'email' => $checkout->email,
app/Services/OrderService.php:94:                    'billing_address_json' => $checkout->billing_address_json,
app/Services/OrderService.php:95:                    'shipping_address_json' => $checkout->shipping_address_json,
app/Services/OrderService.php:99:                $this->createOrderLines($checkout, $order);
app/Services/OrderService.php:112:                    $this->commitReservedInventory($checkout);
app/Services/OrderService.php:115:                $checkout->cart->forceFill([
app/Services/OrderService.php:119:                $checkout->forceFill([
app/Services/OrderService.php:124:                $this->incrementDiscountUsage($checkout);
app/Services/OrderService.php:141:            $this->releaseFailedPaymentReservation($checkout);
app/Services/OrderService.php:199:    private function freshCheckout(Checkout $checkout): Checkout
app/Services/OrderService.php:203:            ->whereKey($checkout->getKey())
app/Services/OrderService.php:217:    private function paymentMethod(Checkout $checkout): PaymentMethod
app/Services/OrderService.php:220:            return PaymentMethod::from((string) $checkout->payment_method);
app/Services/OrderService.php:251:    private function createOrderLines(Checkout $checkout, Order $order): void
app/Services/OrderService.php:253:        $this->cartLines($checkout)->each(function (CartLine $line) use ($checkout, $order): void {
app/Services/OrderService.php:265:                'discount_allocations_json' => $this->discountAllocations($checkout, $line),
app/Services/OrderService.php:285:    private function discountAllocations(Checkout $checkout, CartLine $line): array
app/Services/OrderService.php:287:        if ($checkout->discount_code === null || $line->line_discount_amount <= 0) {
app/Services/OrderService.php:292:            'code' => $checkout->discount_code,
app/Services/OrderService.php:297:    private function commitReservedInventory(Checkout $checkout): void
app/Services/OrderService.php:299:        $this->cartLines($checkout)->each(function (CartLine $line): void {
app/Services/OrderService.php:322:    private function releaseFailedPaymentReservation(Checkout $checkout): void
app/Services/OrderService.php:324:        DB::transaction(function () use ($checkout): void {
app/Services/OrderService.php:325:            $checkout = $this->freshCheckout($checkout);
app/Services/OrderService.php:327:            if ($checkout->status !== CheckoutStatus::PaymentSelected) {
app/Services/OrderService.php:331:            $this->cartLines($checkout)->each(function (CartLine $line): void {
app/Services/OrderService.php:335:            $checkout->forceFill([
app/Services/OrderService.php:343:    private function incrementDiscountUsage(Checkout $checkout): void
app/Services/OrderService.php:345:        $code = trim((string) $checkout->discount_code);
app/Services/OrderService.php:352:            ->where('store_id', $checkout->store_id)
app/Services/OrderService.php:374:    private function cartLines(Checkout $checkout): Collection
app/Services/OrderService.php:383:            ->where('cart_id', $checkout->cart_id)
app/Livewire/Storefront/Account/Auth/Login.php:9:use Illuminate\Support\Facades\RateLimiter;
app/Livewire/Storefront/Account/Auth/Login.php:42:        if (RateLimiter::tooManyAttempts($key, 5)) {
app/Livewire/Storefront/Account/Auth/Login.php:45:                    'seconds' => RateLimiter::availableIn($key),
app/Livewire/Storefront/Account/Auth/Login.php:56:            RateLimiter::hit($key, 60);
app/Livewire/Storefront/Account/Auth/Login.php:63:        RateLimiter::clear($key);
app/Models/Customer.php:62:    public function checkouts(): HasMany
app/Models/Store.php:100:    public function checkouts(): HasMany
app/Livewire/Storefront/Cart/Show.php:131:    public function checkout(): void
app/Livewire/Storefront/Cart/Show.php:137:        $this->redirectRoute('checkout.show', navigate: true);
app/Models/Cart.php:64:    public function checkouts(): HasMany
app/Models/Order.php:25:        'checkout_id',
app/Models/Order.php:70:    public function checkout(): BelongsTo
app/Livewire/Storefront/CartDrawer.php:63:    public function checkout(): void
app/Livewire/Storefront/CartDrawer.php:69:        $this->redirectRoute('checkout.show', navigate: true);
app/Livewire/Storefront/Checkout/Confirmation.php:46:        return view('livewire.storefront.checkout.confirmation', [
app/Livewire/Storefront/Checkout/Show.php:84:        $this->fillFromCheckout($this->checkout());
app/Livewire/Storefront/Checkout/Show.php:100:        $checkout = $this->checkout();
app/Livewire/Storefront/Checkout/Show.php:102:        if (! $checkout instanceof Checkout) {
app/Livewire/Storefront/Checkout/Show.php:107:            $checkout = app(CheckoutService::class)->setAddress($checkout, [
app/Livewire/Storefront/Checkout/Show.php:116:                app(CheckoutService::class)->setShippingMethod($checkout, null);
app/Livewire/Storefront/Checkout/Show.php:132:        $checkout = $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();


status: completed

input:
*** Begin Patch
*** Update File: /Users/fabianwesner/Herd/shop/routes/api.php
@@
-Route::middleware(['auth', 'throttle:api'])
+Route::middleware(['auth', 'throttle:60,1'])
*** End Patch


stdout:
Success. Updated the following files:
M /Users/fabianwesner/Herd/shop/routes/api.php

unified_diff:
@@ -36,3 +36,3 @@

-Route::middleware(['auth', 'throttle:api'])
+Route::middleware(['auth', 'throttle:60,1'])
     ->prefix('admin/v1/stores/{store}')


output: {"output":"Success. Updated the following files:\nM /Users/fabianwesner/Herd/shop/routes/api.php\n","metadata":{"exit_code":0,"duration_seconds":0.0}}


message: The order API controllers/resources/requests and tests are written. I’m running Pint and the two new API test files first; this should flush out any response shape or route-binding issues.

phase: commentary


type: message

role: assistant

text: The order API controllers/resources/requests and tests are written. I’m running Pint and the two new API test files first; this should flush out any response shape or route-binding issues.


output:
Chunk ID: 6a2e71
Wall time: 0.5030 seconds
Process exited with code 0
Original token count: 29
Output:
{"result":"fixed","files":[{"path":"tests\/Feature\/Api\/AdminOrderApiTest.php","fixers":["no_unused_imports"]}]}


command:
/bin/zsh
-lc
vendor/bin/pint --dirty --format agent

type: unknown

cmd: vendor/bin/pint --dirty --format agent

result: fixed


cmd: php artisan test --compact tests/Feature/Api/StorefrontOrderApiTest.php tests/Feature/Api/AdminOrderApiTest.php


output:
Chunk ID: a37f51
Wall time: 1.0011 seconds
Process running with session ID 42592
Original token count: 0
Output:


command: php artisan test --compact tests/Feature/Api/StorefrontOrderApiTest.php tests/Feature/Api/AdminOrderApiTest.php

aggregated_output:
  ⨯....
  ────────────────────────────────────────────────────────────────────────────
   FAILED  Tests\Feature\Api\StorefrontOrderApiTest > storefront order api p…
  Expected response status code [200] but received 201.
Failed asserting that 201 is identical to 200.

  at tests/Feature/Api/StorefrontOrderApiTest.php:109
    105▕             'card_cvc' => '123',
    106▕         ]);
    107▕
    108▕     $payResponse
  ➜ 109▕         ->assertOk()
    110▕         ->assertJsonPath('data.order_number', '#1001')
    111▕         ->assertJsonPath('data.financial_status', 'paid')
    112▕         ->assertJsonCount(1, 'data.lines');
    113▕

  Tests:    1 failed, 4 passed (31 assertions)
  Duration: 1.60s

status: failed


output:
Chunk ID: 66c994
Wall time: 0.0000 seconds
Process exited with code 1
Original token count: 224
Output:

  ⨯....
  ────────────────────────────────────────────────────────────────────────────
   FAILED  Tests\Feature\Api\StorefrontOrderApiTest > storefront order api p…
  Expected response status code [200] but received 201.
Failed asserting that 201 is identical to 200.

  at tests/Feature/Api/StorefrontOrderApiTest.php:109
    105▕             'card_cvc' => '123',
    106▕         ]);
    107▕
    108▕     $payResponse
  ➜ 109▕         ->assertOk()
    110▕         ->assertJsonPath('data.order_number', '#1001')
    111▕         ->assertJsonPath('data.financial_status', 'paid')
    112▕         ->assertJsonCount(1, 'data.lines');
    113▕

  Tests:    1 failed, 4 passed (31 assertions)
  Duration: 1.60s


message: The focused API test found Laravel’s resource response defaulting to `201` for the newly-created order. The spec expects `200 OK` for checkout payment, so I’m setting that response code explicitly.


text: The focused API test found Laravel’s resource response defaulting to `201` for the newly-created order. The spec expects `200 OK` for checkout payment, so I’m setting that response code explicitly.


status: completed

input:
*** Begin Patch
*** Update File: /Users/fabianwesner/Herd/shop/app/Http/Controllers/Api/Storefront/V1/CheckoutController.php
@@
-            return OrderResource::make($this->loadOrder($order));
+            return OrderResource::make($this->loadOrder($order))
+                ->response()
+                ->setStatusCode(200);
*** End Patch


stdout:
Success. Updated the following files:
M /Users/fabianwesner/Herd/shop/app/Http/Controllers/Api/Storefront/V1/CheckoutController.php

unified_diff:
@@ -135,3 +135,5 @@

-            return OrderResource::make($this->loadOrder($order));
+            return OrderResource::make($this->loadOrder($order))
+                ->response()
+                ->setStatusCode(200);
         } catch (PaymentFailedException $exception) {


output: {"output":"Success. Updated the following files:\nM /Users/fabianwesner/Herd/shop/app/Http/Controllers/Api/Storefront/V1/CheckoutController.php\n","metadata":{"exit_code":0,"duration_seconds":0.0}}


cmd: vendor/bin/pint --dirty --format agent && php artisan test --compact tests/Feature/Api/StorefrontOrderApiTest.php tests/Feature/Api/AdminOrderApiTest.php


output:
Chunk ID: 54ddd7
Wall time: 1.0018 seconds
Process running with session ID 17594
Original token count: 5
Output:
{"result":"pass"}


command: vendor/bin/pint --dirty --format agent && php artisan test --compact tests/Feature/Api/StorefrontOrderApiTest.php tests/Feature/Api/AdminOrderApiTest.php

aggregated_output:
{"result":"pass"}
  .....

  Tests:    5 passed (38 assertions)
  Duration: 1.56s


output:
Chunk ID: 12ec1c
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 17
Output:

  .....

  Tests:    5 passed (38 assertions)
  Duration: 1.56s


message: The new API tests are green. I’m running the broader API plus order/cart/checkout suite next, because the payment endpoint touches checkout state and inventory reservations.


text: The new API tests are green. I’m running the broader API plus order/cart/checkout suite next, because the payment endpoint touches checkout state and inventory reservations.


cmd: php artisan test --compact tests/Feature/Api tests/Feature/Cart tests/Feature/Checkout tests/Feature/Orders tests/Feature/Payments


output:
Chunk ID: adaa35
Wall time: 1.0012 seconds
Process running with session ID 19612
Original token count: 2
Output:

  ...


command: php artisan test --compact tests/Feature/Api tests/Feature/Cart tests/Feature/Checkout tests/Feature/Orders tests/Feature/Payments


output:
Chunk ID: 0d86fc
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 25
Output:
........................................

  Tests:    43 passed (278 assertions)
  Duration: 3.46s


cmd: php artisan route:list --path=api/storefront/v1 --except-vendor


cmd: php artisan route:list --path=api/admin/v1 --except-vendor


output:
Chunk ID: 6ea2bc
Wall time: 0.1059 seconds
Process exited with code 0
Original token count: 306
Output:

  POST      api/storefront/v1/carts api.storefront.v1.carts.store › Api\Store…
  GET|HEAD  api/storefront/v1/carts/{cart} api.storefront.v1.carts.show › Api…
  POST      api/storefront/v1/carts/{cart}/lines api.storefront.v1.carts.line…
  PUT       api/storefront/v1/carts/{cart}/lines/{cartLine} api.storefront.v1…
  DELETE    api/storefront/v1/carts/{cart}/lines/{cartLine} api.storefront.v1…
  POST      api/storefront/v1/checkouts api.storefront.v1.checkouts.store › A…
  GET|HEAD  api/storefront/v1/checkouts/{checkout} api.storefront.v1.checkout…
  PUT       api/storefront/v1/checkouts/{checkout}/address api.storefront.v1.…
  POST      api/storefront/v1/checkouts/{checkout}/apply-discount api.storefr…
  DELETE    api/storefront/v1/checkouts/{checkout}/discount api.storefront.v1…
  POST      api/storefront/v1/checkouts/{checkout}/pay api.storefront.v1.chec…
  PUT       api/storefront/v1/checkouts/{checkout}/payment-method api.storefr…
  PUT       api/storefront/v1/checkouts/{checkout}/shipping-method api.storef…
  GET|HEAD  api/storefront/v1/orders/{orderNumber} api.storefront.v1.orders.s…

                                                           Showing [14] routes


output:
Chunk ID: 291f77
Wall time: 0.1022 seconds
Process exited with code 0
Original token count: 102
Output:

  GET|HEAD   api/admin/v1/stores/{store}/orders api.admin.v1.orders.index › A…
  GET|HEAD   api/admin/v1/stores/{store}/orders/{order} api.admin.v1.orders.s…
  POST       api/admin/v1/stores/{store}/orders/{order}/fulfillments api.admi…
  POST       api/admin/v1/stores/{store}/orders/{order}/refunds api.admin.v1.…

                                                            Showing [4] routes


command: php artisan route:list --path=api/admin/v1 --except-vendor

aggregated_output:
  GET|HEAD   api/admin/v1/stores/{store}/orders api.admin.v1.orders.index › A…
  GET|HEAD   api/admin/v1/stores/{store}/orders/{order} api.admin.v1.orders.s…
  POST       api/admin/v1/stores/{store}/orders/{order}/fulfillments api.admi…
  POST       api/admin/v1/stores/{store}/orders/{order}/refunds api.admin.v1.…

                                                            Showing [4] routes


command: php artisan route:list --path=api/storefront/v1 --except-vendor

aggregated_output:
  POST      api/storefront/v1/carts api.storefront.v1.carts.store › Api\Store…
  GET|HEAD  api/storefront/v1/carts/{cart} api.storefront.v1.carts.show › Api…
  POST      api/storefront/v1/carts/{cart}/lines api.storefront.v1.carts.line…
  PUT       api/storefront/v1/carts/{cart}/lines/{cartLine} api.storefront.v1…
  DELETE    api/storefront/v1/carts/{cart}/lines/{cartLine} api.storefront.v1…
  POST      api/storefront/v1/checkouts api.storefront.v1.checkouts.store › A…
  GET|HEAD  api/storefront/v1/checkouts/{checkout} api.storefront.v1.checkout…
  PUT       api/storefront/v1/checkouts/{checkout}/address api.storefront.v1.…
  POST      api/storefront/v1/checkouts/{checkout}/apply-discount api.storefr…
  DELETE    api/storefront/v1/checkouts/{checkout}/discount api.storefront.v1…
  POST      api/storefront/v1/checkouts/{checkout}/pay api.storefront.v1.chec…
  PUT       api/storefront/v1/checkouts/{checkout}/payment-method api.storefr…
  PUT       api/storefront/v1/checkouts/{checkout}/shipping-method api.storef…
  GET|HEAD  api/storefront/v1/orders/{orderNumber} api.storefront.v1.orders.s…

                                                           Showing [14] routes


message: The affected backend suite and route listings are good. I’m running the full Pest suite and a fresh migrate/seed before updating progress and committing.


text: The affected backend suite and route listings are good. I’m running the full Pest suite and a fresh migrate/seed before updating progress and committing.


output:
Chunk ID: 3951ca
Wall time: 1.0014 seconds
Process running with session ID 73519
Original token count: 1
Output:

  .


output:
Chunk ID: 3c5769
Wall time: 5.0005 seconds
Process running with session ID 73519
Original token count: 30
Output:
...........................................................................
  ........................................


command:
/bin/zsh
-lc
php artisan test --compact

cmd: php artisan test --compact


output:
Chunk ID: 1faffc
Wall time: 0.0000 seconds
Process exited with code 0
Original token count: 20
Output:
...............

  Tests:    131 passed (628 assertions)
  Duration: 15.73s


cmd: php artisan migrate:fresh --seed --no-interaction


output:
Chunk ID: c58770
Wall time: 1.0001 seconds
Process running with session ID 46095
Original token count: 1629
Output:

  Dropping all tables ............................................ 4.91ms DONE

   INFO  Preparing database.

  Creating migration table ....................................... 2.16ms DONE

   INFO  Running migrations.

  0001_01_01_000000_create_users_table ........................... 1.82ms DONE
  0001_01_01_000001_create_cache_table ........................... 0.44ms DONE
  0001_01_01_000002_create_jobs_table ............................ 1.13ms DONE
  2025_08_14_170933_add_two_factor_columns_to_users_table ........ 0.49ms DONE
  2026_05_03_211409_create_organizations_table ................... 0.23ms DONE
  2026_05_03_211413_create_stores_table .......................... 4.94ms DONE
  2026_05_03_211416_create_store_domains_table ................... 0.54ms DONE
  2026_05_03_211419_create_store_settings_table .................. 0.18ms DONE
  2026_05_03_211425_create_store_users_table ..................... 0.36ms DONE
  2026_05_03_211556_create_customers_table ....................... 0.65ms DONE
  2026_05_03_212158_create_customer_password_reset_tokens_table .. 0.41ms DONE
  2026_05_03_213856_create_products_table ........................ 0.99ms DONE
  2026_05_03_213857_create_product_options_table ................. 0.32ms DONE
  2026_05_03_213858_create_product_option_values_table ........... 0.32ms DONE
  2026_05_03_213859_create_product_variants_table ................ 0.72ms DONE
  2026_05_03_213900_create_variant_option_values_table ........... 0.36ms DONE
  2026_05_03_213901_create_inventory_items_table ................. 0.35ms DONE
  2026_05_03_213902_create_collections_table ..................... 0.45ms DONE
  2026_05_03_213903_create_collection_products_table ............. 0.35ms DONE
  2026_05_03_213904_create_product_media_table ................... 0.47ms DONE
  2026_05_03_223824_create_themes_table .......................... 0.32ms DONE
  2026_05_03_223830_create_theme_files_table ..................... 0.31ms DONE
  2026_05_03_223837_create_theme_settings_table .................. 0.16ms DONE
  2026_05_03_223841_create_pages_table ........................... 0.40ms DONE
  2026_05_03_223844_create_navigation_menus_table ................ 0.36ms DONE
  2026_05_03_223848_create_navigation_items_table ................ 0.39ms DONE
  2026_05_03_225400_create_carts_table ........................... 0.44ms DONE
  2026_05_03_225405_create_cart_lines_table ...................... 0.37ms DONE
  2026_05_03_225409_create_checkouts_table ....................... 0.62ms DONE
  2026_05_03_225413_create_shipping_zones_table .................. 0.26ms DONE
  2026_05_03_225418_create_shipping_rates_table .................. 0.36ms DONE
  2026_05_03_225422_create_tax_settings_table .................... 0.21ms DONE
  2026_05_03_225427_create_discounts_table ....................... 0.54ms DONE
  2026_05_04_000408_create_customer_addresses_table .............. 0.32ms DONE
  2026_05_04_000408_create_orders_table .......................... 0.88ms DONE
  2026_05_04_000410_create_order_lines_table ..................... 0.47ms DONE
  2026_05_04_000411_create_payments_table ........................ 0.51ms DONE
  2026_05_04_000412_create_refunds_table ......................... 0.41ms DONE
  2026_05_04_000413_create_fulfillments_table .................... 0.40ms DONE
  2026_05_04_000414_create_fulfillment_lines_table ............... 0.33ms DONE

   INFO  Seeding database.

  Database\Seeders\OrganizationSeeder ................................ RUNNING
  Database\Seeders\OrganizationSeeder .............................. 5 ms DONE

  Database\Seeders\StoreSeeder ....................................... RUNNING
  Database\Seeders\StoreSeeder ..................................... 1 ms DONE

  Database\Seeders\StoreDomainSeeder ................................. RUNNING
  Database\Seeders\StoreDomainSeeder ............................... 1 ms DONE

  Database\Seeders\UserSeeder ........................................ RUNNING
  Database\Seeders\UserSeeder .................................... 268 ms DONE

  Database\Seeders\StoreUserSeeder ................................... RUNNING
  Database\Seeders\StoreUserSeeder ................................. 1 ms DONE

  Database\Seeders\StoreSettingsSeeder ............................... RUNNING
  Database\Seeders\StoreSettingsSeeder ............................. 2 ms DONE

  Database\Seeders\CollectionSeeder .................................. RUNNING
  Database\Seeders\CollectionSeeder ................................ 3 ms DONE

  Database\Seeders\ProductSeeder ..................................... RUNNING
  Database\Seeders\ProductSeeder ................................. 197 ms DONE

  Database\Seeders\ThemeSeeder ....................................... RUNNING
  Database\Seeders\ThemeSeeder ..................................... 1 ms DONE

  Database\Seeders\ThemeFileSeeder ................................... RUNNING
  Database\Seeders\ThemeFileSeeder ................................. 1 ms DONE

  Database\Seeders\ThemeSettingsSeeder ............................... RUNNING
  Database\Seeders\ThemeSettingsSeeder ............................. 1 ms DONE

  Database\Seeders\PageSeeder ........................................ RUNNING
  Database\Seeders\PageSeeder ...................................... 2 ms DONE

  Database\Seeders\NavigationMenuSeeder .............................. RUNNING
  Database\Seeders\NavigationMenuSeeder ............................ 1 ms DONE

  Database\Seeders\NavigationItemSeeder .............................. RUNNING
  Database\Seeders\NavigationItemSeeder ............................ 5 ms DONE

  Database\Seeders\TaxSettingsSeeder ................................. RUNNING
  Database\Seeders\TaxSettingsSeeder ............................... 1 ms DONE

  Database\Seeders\ShippingZoneSeeder ................................ RUNNING
  Database\Seeders\ShippingZoneSeeder .............................. 1 ms DONE

  Database\Seeders\ShippingRateSeeder ................................ RUNNING
  Database\Seeders\ShippingRateSeeder .............................. 2 ms DONE

  Database\Seeders\DiscountSeeder .................................... RUNNING
  Database\Seeders\DiscountSeeder .................................. 3 ms DONE

  Database\Seeders\CustomerSeeder .................................... RUNNING
  Database\Seeders\CustomerSeeder ................................ 264 ms DONE


command: php artisan migrate:fresh --seed --no-interaction