How to use another relation's column as titleAttribute in Select
Hello everyone. Please check my first screenshot. As you see, I list unused permissions in Forms\Components\Select
But my permission also have this relation:
permission->permissionLanguages->where('language_id', Auth::user()->language->id)->first()->name
How can I use name column of permissionLanguages as titleAttribute?

14 Replies
Wider screenshot

Solution
try using this
something like that
Let me try.
This is current situation. I leave this screenshot to show what changed

wait that's not the thing you asked, I tought you wanted the select label to be the name, you want the titleAttribute: 'code' to be titleAttribute: something else
Don't know if it's possible if the field only accepts a string
I want to keep everything in ->relationship() but your solution helped me. Thank you very much

Here is what I changed

cool
Thanks to you
if that's the solution don't forget to mark it as such
I put 👍 to you answer
anything else should I do?
right click on the message hover apps -> mark as solution
so that discord can clear the list for pending posts
Okay. I did and I will keep this in my mind. Thank you