CheckboxList description with relationships
I have table called technologies which has
id, name, description and I am displaying this using checkboxlist like below
Since CheckboxList can also display description, I want it to display my technologies description as well, I try like below
->descriptions(fn() => Technologies::pluck('description', 'id')->toArray());
And yes this introduce duplicate query, and I cannot use fn(Model $record) because of relationships (maybe)
I call this from UserForm, and users -> technologies relationships is
So, how can I display correct description on checkboxlist descriptions without duplicate query and thanks in advance4 Replies
I haven't tried it yet but would removing one query make a big difference to your page?
I have around 3-4 relations like this for where I want to use, and now I prevent it like this for duplicate query and it works
but would like to know better options
the reasons I had for description is to display in brief and yes it does make difference
Laravel
Computed Properties | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Unfortunately this doesn't work for me (maybe I am noob). These checkbox list is display inside panel, and when I try this n+1 is still happening