Custom Page (single page edit/view, no table view) saving 2 many-to-many relationships possible?
My second Filament project, first V3 project. I ask very stupid questions from time to time, bear with me 🙇♂️
I want:
To save a bunch of IDs for cities and prefectures as M:M relationship (company_prefectures and company_cities) using Filament Custom Page (by Custom Page I mean single page edit/view, no table view)
Solution 1?
I can save it as 2 separate multiselect JSONs with tenant ID attached in a migration as below:
But I hear JSONs are extremely heavy, especially if you need to be able to quickly search through these IDs.
Solution 2?
Save it as M:M, but I've no idea how to do it using a single custom page (Making 2 separate pages for 2-4 multiselect inputs seems like an overkill to me and is not a good UX). If it's possible, I understand I'll need 2 separate M:M tables (company_prefecture and company_city?) But if I try to pull something like that off, ->relationship returns null in my case.
Any advice would be much appreciated
1 Reply
My custom page (saving IDs as JSONs)