Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

acrm's avatar
Level 1

How to insert a break in a Nova table?

Hi all,

while playing around with Nova tables I tried to list all roles of a user in the table for the User resource using that code:

Text::make('Roles', function () {
                if($this->roles->count() > 0) {
                    $roles = '';
                    foreach($this->roles as $role) {
                        $roles .= $role->name . '<br>';
                    }
                    return $roles;
                } else {
                    return 'No Roles';
                }

Unfortunately, it returns in cleartext/ not-interpreted.

Likely I am missing some easy clue but I cannot think of it. I appreciate every remark, thank you!

0 likes
0 replies

Please or to participate in this conversation.