Table builder with created_by_id
Created 2 years ago by emergingdzns

How do I add the created_by_id column to the table builder so that it shows the user's name in the table that corresponds to the user id? I tried doing entry.created_by_id.presenter.name in the $columns array but it's empty.

piterden  —  2 years ago Best Answer
        'entry.created_by_id' => [
            'wrapper' => '{{ user({value}).display_name }}'
        ],
emergingdzns  —  2 years ago

Thanks man! You're a life saver.

ryanthompson  —  2 years ago

You can also use entry.created_by.display_name which basically walks through the relationship. @piterden is also correct but just a different approach - using the view parser. But it will cause extra queries even if you're autoloading.