0
Good afternoon!
I’m needing to display a database column, through the parser within a IF
, how can I do this?
I am passing an array and rendering with the parser, code below:
$dados = [
"certificadoDigital" => $this->certificado->where('cnpj', $buscaCnpj['cnpj'])->first()
];
echo $this->parser->setData($dados)->render("configuracao");
In the "configuration" file I am doing a check to see if the array really has record in the database.
{if empty($certificadoDigital)}
<span> Certificado não inserido </span>
{else}
<span> Certificado inserido </span>
{endif}
In the database certificado
has three columns (id, arquivo , cnpj)
, through this, as I can call this column inside the parser. For example {$certificadoDigital['arquivo']}
?
Thank you.