浏览器下载或导出到服务器磁盘上
匿名 · 更新于 2021/6/28
在您的控制器中,我们现在可以下载此导出:
public function export()
{
return Excel::download(new InvoicesExport, 'invoices.xlsx');
}
1
2
3
4
2
3
4
或将其存储在磁盘上,(例如 s3或oss,如果只是导出到服务器磁盘则可以去掉第3个参数):
public function storeExcel()
{
return Excel::store(new InvoicesExport, 'invoices.xlsx', 's3');
}
1
2
3
4
2
3
4
