N1XN
Save prefix values
Some magic is happening behind the scenes I did not understood, so my workaround is:
remove
->reactive()
and set the value directly after update using ->afterStateUpdated(fn ($state, callable $set) => $set('code', Party::find($state)->code.'-'))
4 replies
Access nested sum
I am not sure, because I solved this - but I think this way I would loose sorting, or would have to implement it manually.
I fixed it by defining the needed relationship inside the model, so I don't have to traverse.
https://github.com/staudenmeir/eloquent-has-many-deep
9 replies
Dependant select with multiple options
Try removing 'name:' and 'titleAttribute:' inside relationships() function.
It should be ->relationships('nations', 'name')
Ultimately you want MorphToSelect https://filamentphp.com/docs/3.x/forms/fields/select#handling-morphto-relationships
10 replies