To to plug attribute from preloadRecordSelect RelationManager
Is there a way to pluck out a different column from the preload function below instead of having the Id show up in the dropdown by default?
10 Replies
The id shouldn be the default but the relation title attribute.
you can pass ->recordTitleAttribute() to customise it for that action only i think
Let me have a look
The relation title attribute as per the docs indicates I should add the attribute to identify the model so I understood it's the id.
I think it should be clear that „title“ doesn’t refer to the id 😅
Yes that's right. In that case, I'll redo the relation manager. Or is there a way to change the attribute if already created?
theres a property
Sure, just change the property on the RM
you dont need to regenerate it
Works now.
Thank you very much.
You can try this. It works for me