Laravel-Excel 导出csv文件 中文乱码处理
标签(空格分隔): 未分类
文档地址【https://docs.laravel-excel.com/3.1/exports/settings.html】
实现WithCustomCsvSettings 接口,或者增加配置文件 `excel.php`
namespace App\Exports;
use Maatwebsite\Excel\Concerns\WithCustomCsvSettings;
class InvoicesExport implements WithCustomCsvSettings
{
public function getCsvSettings(): array
{
return [
'delimiter' => ',',
'use_bom' => true,
'output_encoding' => 'UTF-8',
];
}
}
标签:Laravel,WithCustomCsvSettings,导出,Excel,乱码,csv
From: https://www.cnblogs.com/yanweifeng/p/17457043.html