Hello all,
I have a book and story tables with a pivot table between the two. I have relationship manager to handle associating and dissociating books and stories. But the pivot table also has other data that needs to be entered when creating an association (order).
So I have overridden the form for the associate action like so:
Tables\Actions\AssociateAction::make()
->form([
Forms\Components\Select::make('story_id')->options(Story::query()->pluck('name', 'id'))->required()->label('Story'),
Forms\Components\TextInput::make('order')->numeric()->required()->label('Order'),
]),
I am now trying to save all this stuff, but I cannot seem to retrieve the Book I'm currently editing inside the action. Is there a way to do so?