<?php
namespace App\Exports;
use App\Posicao;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\WithCustomCsvSettings;
class PosicoesExport implements FromView,WithCustomCsvSettings
{
public function __construct($posicoes, $logo, $campos, $clientes, $veiculos, $rastreadores, $motivos_transmissao){
$this->dados = compact('posicoes','logo','campos','clientes','veiculos','rastreadores','motivos_transmissao');
}
public function view(): View
{
return view('posicao.posicaoexcel', $this->dados);
}
public function getCsvSettings(): array
{
return [
'use_bom' => true
];
}
}
?>
Prerequisites
Versions
Description
I'm trying to export a CSV file
Steps to Reproduce
Call the controller method and wait.
Expected behavior: The CSV file complete
Actual behavior: The script stops and give this Exception:
DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity
Additional Information
Here ir my codes: Controller Call:
Export:
View: