I'm using $user->load(['roles', 'expertises', 'languages']) to return data to a front-end made with Vue.
The Vue component I'm using (Treeselect) needs an array of only ID's to load choices made by user. AFAIK this is not possible ->load(['expertises' => 'myMethod']), this can be useful when you want to return 'expertises' array key, but loading your own filtered data from a custom method.
Please, help me giving some ideas on how to achieve this task.
Thank you.