[Group] Using table id as the key, but display the name at the table
I want to group my table by classroom.id, but when displaying the grouping at the table, it should show the classroom.name
for example something like this
return $table
->query($query)
->groups([
Group::make('classroom.id')
->displayUsing('clasroom.name')
])
for example the displayUsing function will using the classroom.name as the grouping label. Any similar method that I can use?
Thank you
1 Reply
Solution
of found it, I can use column()