mathioud
mathioud
FFilament
Created by mathioud on 11/19/2023 in #❓┊help
Multiple Select with belongsToMany relationship, saves but does not show selected after reload.
Answer: It just didn't like the Select::make('secondary_traits') line. if i rename it to Whatever else, it's just fine. Select::make(lalalala') works. There is some kind of conflict with the relationship name , when i use a name same with the relation's with underscore, that stops it from working.
3 replies
FFilament
Created by Askancy on 9/21/2023 in #❓┊help
Multiple Select with BelongsToMany relationship
sorry for such a late reply.. 1. Did you make it work ? 2. If you did, when you visit the form, is it populated with the already selected values ? I made it work, but after i visit the form again, there are no selected values. In Db, they are ok though.
9 replies
FFilament
Created by mathioud on 11/17/2023 in #❓┊help
belongsToMany relationship between same model entries
Update: Ok so I was getting the error that there was a call to /App/Models/Product::products() function, when in the form of this relationship. Which is weird, because i have specifically named my relationship "relatedProducts()" and not "products()" I changed the relationship function to "products()" and then all good. Any guesses why it assumed that it had to call products() ?
3 replies