I want to insert an icon in front of the attributes, how can I do it. this is my code.
<?= DetailView::widget([
'model' => $model,
'options' => ['class'=>'table','style'=>'margin-bottom:0.2em;'],
'attributes' => [
'DT_NASC',
['attribute'=>'PR_GENERO_ID','value'=>$model->pRGENERO->DESIG],
['attribute'=>'PR_PROFISSAO_ID','value'=>$model->pRPROFISSAO->DESIG],
['attribute'=>'LOCALIDADE_ID','value'=>$model->lOCALIDADE->NOME],
['attribute'=>'NACIONALIDADE_ID','value'=>$model->nACIONALIDADE-> NACIONALIDADE],
'OBS:ntext',
//'DT_REGISTO',
],
]) ?>
Add another parameter "format" and its value "html" in the attribute definition. And than you can append the icon as html with value
Example:
Or if you want icon with in attribute label add parameter "label" and append icon with the label name