Hi,
I have the following custom column in my GridView:
[
'attribute' => 'id',
'label' => 'Invoices',
'value' => function($model)
{
$invoicelinks = $Invoice->getInvoiceLinks($model->id); //Invoice is my model,
return $invoicelinks;
},
],
What I am trying to do is to build normal href links in a function and return it to the GridView to display it in a column. Firstly I need to know what is best practice regarding the function creation? Do I create it in my model, controller or component? I thought my model would be best, but now not so sure. And then how do I reference it via the column?
Thanks