How to list multiple items in a column? (BelongsToMany & HasMany relationships)
I'm using
spatie/laravel-permission
where User
BelongsToMany
Role
I tried TextColumn::make('roles')
which, as anticipated, just spits out a string of the array.
I want something similar to QuickAdminPanel where all entries are listed by their title/name.2 Replies
try
TextColumn::make('roles.name')
That did the trick! And it was actually clear in the docs, just forgot about it. 🤦♂️ Thanks for the prompt reply, Dan! Loving Filament. Cheers!