I have done import in laravel 5 but facing some problem while exporting file. code is not proper and doesnot give any logic. I have tried similiar to documentation
public function exportData(Test $test,Excel $excel){
$test=$test->all();
Excel::create('Test excel', function($test) {
$test->sheet('sheet1', function($sheet) {
$sheet->setOrientation('landscape');
});
})->export('xls');
}
how to export csv file from mysql? I am using "maatwebsite/excel": "~2.0.0" package