Table builder with created_by_id

Table builder with created_by_id

emergingdzns -
1 year ago

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 -
1 year ago

emergingdzns -
1 year ago

ryanthompson -
1 year 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.