Skip to content

How can I get the current relative $record from within the RepeatableEntry? #12814

Discussion options

You must be logged in to vote

Turns out I didn't need to access the iterated record. I am trying to re-use form and infolist code by storing it on the model and couldn't get the current record to initialize it, but turns out I didn't need to. Since the record is current I could just use ->schema(Pet::getInfoList()) without having to use something like $record::getInfoList() or $record->pet::getInfoList(). I still think it would be helpful if we could access the current record within RepeatableEntry, I could only access the parent via ->schema(fn ($record) => dd($record)).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@myregistration
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by myregistration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants