F
Filamentβ€’6mo ago
WEBMAS

How to make such a multi input field?

Hello everybody. I have a table: sites: id user_id domain mirrors (json type) I want to add mirrors like in the picture. Maybe it's better to make a separate table for mirrors instead of using the json type? Which is better? sites: id user_id domain mirrors (json type) OR sites: id user_id domain site_mirrors: site_id domain
No description
5 Replies
Vp
Vpβ€’6mo ago
Which is better?
Why don't you try both and check for yourself..
How to make such a multi input field?
https://filamentphp.com/docs/3.x/forms/fields/repeater Based on Image, this is perfect imo https://filamentphp.com/docs/3.x/forms/fields/repeater#simple-repeaters-with-one-field
WEBMAS
WEBMASOPβ€’6mo ago
Thank you! In general practice, which option is preferable? There are generally accepted patterns on this topic.
Vp
Vpβ€’6mo ago
I didn't know that.. for me everything is personal preferences πŸ™ƒ
WEBMAS
WEBMASOPβ€’6mo ago
"We recommend that you store repeater data with a JSON column in your database. Additionally, if you're using Eloquent, make sure that column has an array cast."
No description
Vp
Vpβ€’6mo ago
imo this is a recommendation for using a repeater, not about which is better
Want results from more Discord servers?
Add your server