[英]laravel : Error Call to a member function all() on array
This is used to export excel这个用来导出 excel
My controllers:我的控制器:
public function reportExport(Request $request)
{
return Excel::download(new ReportExport($request), 'LAPORAN ABSENSI.xlsx');
}
Export folder: ReportExport导出文件夹:ReportExport
return [
"att_cross" => $att_cross,
"belum_absen" => $belum_absen,
"absen" => $absen,
];
but, when I return one of the data is successful, for example:但是,当我成功返回其中一个数据时,例如:
return $absen;
I want to display the contents of the variable $absent, $belum_absen, $att_cross but I get an error message "Call to a member function all() on array " how can I display the data for these three parameters?我想显示变量 $absent、$belum_absen、$att_cross 的内容,但我收到一条错误消息“Call to a member function all() on array” 我该如何显示这三个参数的数据?
Read the docs for Excel package, you need to map()
the output.阅读 Excel package 的文档,您需要
map()
output。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.