livewire-datatables icon indicating copy to clipboard operation
livewire-datatables copied to clipboard

BelongsToMany Relationshop

Open bernhardh opened this issue 3 years ago • 2 comments

Hello! I need a column to show a linked list of belongsToMany Relationsships. Something like:

Column::callback(["areas.id", "areas.name"], function($id, $name){
    return "<a href=\"" . route("areas.edit", [$id]) . "\">" . $name . "</a>";
})->label(__("Service Areas")),

This code would work, for a belongsTo relationship, but not for a belongsToMany. Any ideas?

Possibly related issues: #327, #323

bernhardh avatar Feb 02 '22 19:02 bernhardh

Hi, I have the same need, put link on many relation list (id, name) on the table. Could i use the list with a view ?

mickael-dadoun avatar Jun 09 '22 10:06 mickael-dadoun

No Update ?

PsyLogic avatar Jul 28 '23 16:07 PsyLogic