Using an eloquent query for the form
I am using to compose the table, the model "component_pivot", while for the form I would need to use the model component, how can I do that?
For the form I would need to use this eloquent query:
3 Replies
any idea?
So you are trying to render a pivot model? opposed to the model/
I solved with:
but I have another problem:
With this query now I no longer use the pivot table, I can do everything with one table.
Basically it works like this: In the table it shows the names of the games by grouping the achiviements by id_game and id_console, by doing this I avoid having duplicate results in the table. But now when I click on a result, it shows me only one achiviements.
I would like to have all the achiviements of that game displayed, so it should run the query:
Trofei::where('id_console', $id_console)->where('id_gioco', $id_game)->get()
As you see in the screen it shows only one TextInput, instead I would like it to show all the items that only related to that $id_game and $id_console