Can't receive relationship data on a form createAction
Hi
I have a small problem but terrible to investigate on it ..
I have this code on my headerActions of my table:
I also have my workspaceSchema (for my forms), Everything work to create "TeamWorkspace" also when I use the select multiple to create a "metiers" (BelongsToMany relation of TeamWorkspace) I don't have any "metiers" value stored in my $data ...
Also when I edit TeamWorkspace with the following code it works perfectly:
I understand that it works because TeamWorkspace is already created .. But how to in CreateAction
2 Replies
my schema:
The problem is located with my Select::make('metiers') where i use it for my relation "metiers"
When I remove relationship I can get in $data metiers also Multiple is not populated with already linked "metiers" on edit
@Dennis Koch ? 🙂
1st. Read #✅┊rules to know how to format your code properly.
2nd. Please don't tag people.
3rd. If you're using
->relationship()
the relation will be saved automatically for you, hence why there's no metiers
in the $data
array