Get Nested Parent
Hi all
How would one get the parent resource model from the nested resource. Eg. I am on this page:
/contacts/suppliers/9e226114-dfa0-49eb-8dba-94200fb935e9/supplier-invoices/create
I am on the 'Create supplier invoice page' and I want to access the supplier which is the parent.
Thanks al4 Replies
This works but I wonder if there is a better way:
$schema->getLivewire()->parentRecord
getParentRecord()
https://github.com/filamentphp/filament/discussions/17259#discussioncomment-14076708GitHub
nested resourses · filamentphp filament · Discussion #17259
Package Form builder Package Version v4.x beta How can we help you? Hi, I want to access the parent ID in the nested resource. How can I do it? In the nested resource, I use the createOptionForm me...
well da,n
thank you
how would you go about using that on a Schema file where we share the form. It has static configure method. so $this->getParentRecord() doesnt work
Inject
$livewire