© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
9 replies
rg.block

Saving repeater with relationship as json

Is it possible to save a repeater's data as json when the repeater has a relationship?

To better explain, I am working within the panel builder. I have 2 main models, Order and Document. Order hasMany documents and Document belongsTo Order.

Inside my OrderResource file: If I go ahead and setup a repeater named ('form_data') with no relationship, and then I set my orders table properly with a json data type column and my model with the proper casts, the data gets saved correctly into the form_data column as a json object. But then if I make a change to the repeater and add ->relationship('documents'), keep the same name for the repeater ('form_data'), then when I try to save the data it tries to save the data in individual columns based on the names of the fields inside the repeater as opposed to saving them inside the column 'form_data' under my documents table.

I have looked at the filament demo along with multiple videos on laracasts, codecourse, youtube, and I am yet to find an example of someone saving a repeater's data with a relationship inside a json column. So perhaps I am just trying to do something that is not actually supported.

Happy to paste any code if this is something that is supported.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Repeater not saving pivot relationship
FilamentFFilament / ❓┊help
2y ago
Problem saving records in Repeater with a relationship
FilamentFFilament / ❓┊help
3y ago
Repeater with hasMany relationship
FilamentFFilament / ❓┊help
3y ago
issue with repeater and relationship
FilamentFFilament / ❓┊help
7mo ago