F
Filament2mo ago
Tears

Adding a "hasOne" relationship in the resource view.

Hello there, from the docs I see there is the option to create a Layout form components that works for the hasOne, but it says: " If the metadata record does not exist, it is automatically created." And i don't want it to be created... So how would I show a "hasOne" record, same way as it the Relation managers shows the related records under the view form? I have to models: Quote and Document, the relation between them is 1:1, and I want to show info of the document in the Quote view, but only if its created previously, I dont wanna it to create auto Thank you.
1 Reply
Matthew
Matthew2mo ago
There aren't alot of good case uses for the relationship manager in a hasOne. Just use the 'model.relation' method from your exisitng model methods.
Want results from more Discord servers?
Add your server