"MatchWebsite\\Excel\\sheet::mapArrayBlurow ()の戻り値は型配列でなければなりません.
2659 ワード
こんにちは、なぜ私はこのエラーを得るか?
解決策は?
view ( Ajax ):
解決策は?
view ( Ajax ):
` $('#export').click(function (e) {
let rows_selected = tblMassy.column(0).checkboxes.selected();
if (rows_selected.length >= 1) {
$.each(rows_selected, function(index, rowId){
console.log( "http://localhost:8000/eksportfilter/" + rowId ) ;
// location.href= "/eksportfilter/" + rowId;
$.ajax({
type:'POST',
url: "http://localhost:8000/eksportfilter/" + rowId,
dataType: "JSON",
success: function (response) {
console.log( response )
}
});
});
console.log(rows_selected.length);
swal("Good job!", "Eksport data successfully!", "success");
$('#tblMassy').DataTable().ajax.reload();
// location.reload();
} else {
swal("Failed Export!", "No Data Delected!", "error");
}
});`
マイコントローラ` public function eksportfilter($id)
{
$data = [
'id' => $id,
$m_assy = m_assy::find($id)
];
return Excel::download(new TransactionsExportFilter($m_assy), 'users.xlsx');
}`
MAATウェブサイトのエクスポート`public function __construct($data)
{
$this->data = $data;
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return collect($this->data);
}
public function headings(): array
{
return [
'id',
'assymainharness',
'assyab',
'assyab1',
'assyab2',
'assyab3',
'type',
'assycode',
'suffixlevel',
'desccarline',
'factory',
'customer',
];`
誰かこの問題を解いてくれませんか.Reference
この問題について("MatchWebsite\\Excel\\sheet::mapArrayBlurow ()の戻り値は型配列でなければなりません.), 我々は、より多くの情報をここで見つけました https://dev.to/harisulishbah/return-value-of-maatwebsiteexcelsheetmaparrayblerow-must-be-of-the-type-array-int-returned-50obテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol