F
Filament15mo ago
Eren

Json Show Value

Hello I have json column on my db. I want to show this section on my order details page.
{"name": "Afternoon Session",

"prices":
[
{"age": "12", "name": "Driver afternoon", "price": "30.00", "value": "2"}, {"age": "55", "name": "non driver", "price": "15.00", "value": null}
]
}
{"name": "Afternoon Session",

"prices":
[
{"age": "12", "name": "Driver afternoon", "price": "30.00", "value": "2"}, {"age": "55", "name": "non driver", "price": "15.00", "value": null}
]
}
What is the easiest way to show this json column in resource page ? I try to add key value but on prices another section. So. I couldnt figure it out. Please I will appriciate for an example. Thank you
3 Replies
Dennis Koch
Dennis Koch15mo ago
If you don't need to edit, use a ViewField
Dan Harrin
Dan Harrin15mo ago
or TextInput::make('columnName.name') and then a repeater for the prices Repeater::make('columnName.prices')
Eren
Eren15mo ago
Thank you guys. Really helpful.