Hi, I am new to yii2
please someone can help me, how i can display in detailview a value of a relate table.
As the following example i want show in listview/detailview name of client not id of order
client_id (relate to Client–id_client
Thanks in advance
If you set the relation (method getClient() in Order) you can set the value of attribute like this:
'model' => $model,
'attributes' => [
'label' => 'Client name',
'value' => $model->client->name,
Thank you very much!!!!
This works perfectly in view - DetailView::widget([ but as I want to see client-name also in index - GridView::widget([