Question and answer is powered by AnsPress.io
I am working with Laravel latest version and I want table export into CSV file when I click an option. How can I do that?
you can upload several tables any to the relative file. apply this code
$path = $folderArray[count($folderArray)-1];
Excel::create($myFilename, function($excel) use($arraydata) {
$excel->sheet(‘file’, function($sheet) use($arraydata) {
$sheet->fromArray( $arraydata );
});
})->store(‘csv’, $path);