I've got a table of file groups - description, files (a JSON-encoded array of file IDs)
I've got controllers with the one-to-many relationship set up, I've got models.
Is there an 'easy and obvious to everyone but me' Eloquent way to get back the file groups with an array/object of the file names rather than the JSON-encoded array of file IDs? ATM the only way I can think of doing this requires a "shim table" for the relationship, rather than the JSON-encoded array.
Why are you using the JSON approach to begin with? It’s likely to be slower than using a pivot table (which is what I guess you mean by a ‘shim table’?), and pivot tables are easier to debug and update, too.
But if you really want to use the JSON approach, you should (I think) be able to use this package to create JSON-based relationships.
Yes, "pivot table" is the thing I couldn't remember the name of when drafting the question.
The only reason I started down the "JSON-encoded array" route is that is how an array of IDs ended up being inserted into a database column. Given the simplicity (to understand) of pivot tables, I'll switch to using one of those instead.