I am trying to display related model attribute data, but either there's a bug or I have done something wrong. :)

wanted to display related model object attribute value
nothing was displayed
Made temporary new custom column type
and this way data was displayed when original if ($entry->{$column['entity']}) { failed

`
"backpack/base": "^0.8.2",
"backpack/crud": "^3.3",
"laravel/framework": "5.5.*",
php 7
`
@tarmo1979 if you have model relations ready. I used this way:
$this->crud->addColumn([// n-n relationship (with pivot table)
'label' => "Types", // Table column heading
'type' => "select_multiple",
'name' => 'types', // the method that defines the relationship in your Model
'entity' => 'types', // the method that defines the relationship in your Model
'attribute' => "name", // foreign key attribute that is shown to user
'model' => "App\Models\EventTypes", // foreign key model
]);
It is a 'model' => "App\Models\EventTypes" there and you can add 'pivot' => true
Also you can use model functions:
$this->crud->addColumn([ //run a function on the CRUD model and show its return value
'name' => "count",
'label' => "Users", // Table column heading
'type' => "model_function",
'function_name' => 'countEventUsers', // the method in your Model
]);
Most helpful comment
@tarmo1979 if you have model relations ready. I used this way:
It is a
'model' => "App\Models\EventTypes"there and you can add'pivot' => trueAlso you can use model functions: