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 al
4 Replies
David | Fortune Validator
This works but I wonder if there is a better way: $schema->getLivewire()->parentRecord
LeandroFerreira
LeandroFerreira2mo ago
GitHub
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...
David | Fortune Validator
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
LeandroFerreira
LeandroFerreira2mo ago
Inject $livewire

Did you find this page helpful?