protonemedia / laravel-splade

💫 The magic of Inertia.js with the simplicity of Blade 💫 - Splade provides a super easy way to build Single Page Applications (SPA) using standard Laravel Blade templates, and sparkle it to make it interactive. All without ever leaving Blade.
https://splade.dev
MIT License
1.47k stars 111 forks source link

Map form or table to a JSON column #509

Closed EmilMoe closed 1 year ago

EmilMoe commented 1 year ago

Description:

I want to connect my components and tables to a column in the database that is a JSON column. I haven't found any hints on how to do so.

I use it to keep multiple languages of ie a name.

Steps To Reproduce Issue:

I tried this, but that's not working

<x-splade-input :name="name['en']"..
EmilMoe commented 1 year ago

Didn't work

EmilMoe commented 1 year ago

This seems to have solved it

<x-splade-input
        name="name[]"
        v-model="form.name.en"
        label="Name (EN)"
/>