Skip to content

The snapshot schema

Caleb Porzio edited this page Nov 3, 2022 · 1 revision

A snapshot in Livewire is the chunk of data passed back and forth from browser to server to store and re-create a Livewire component in PHP across multiple requests.

Here's the schema at a glance, then we'll walk through each part:

[
    "data" => [
        0 => [
            "foo" => "bar",
            "bar" => null,
            "propertyWithHook" => null,
            "arrayProperty" => [
                0 => [
                    0 => "foo",
                    1 => "bar",
                ],
                1 => [
                    "s" => "arr",
                ],
            ],
        ],
        1 => [
            "errors" => [],
            "locale" => "en",
            "id" => "xjeppJmtUdgBdGdKkP67",
            "name" => "JueKR83K6FEXO5SwgO2C",
            "class" => "LegacyTests\Unit\DataBindingStub",
            "children" => [],
            "deps" => [],
            "s" => "lw",
        ],
    ],
    "checksum" => "a0f4a3070404008ae835e7868f9e9282e076eed5f0981fa94a3b217af1e4d289",
]