Hello,
I am displaying a gridview and one column contains an ID. I want the user to be able to click on the ID and be taken to an external website but I cannot seem to create an external link.
Here is my code:
[
'label' => 'ID',
'format' => 'raw',
'attribute' => 'name',
'value' => function ($data) {
return Html::a($data['name'], [$data['href']]);
},
],
The array looks something like this:
'name' => 'test',
'id'=> '17',
'href' => 'https://test.com/?id=17'
The output is always a reference to my own site ie:
Many thanks for your help