Good Day guys,.. I need to download a excel template only show with headers,..
I have good and working function code in laravel-excel version 2 of my problem,. but in version 3.1 i dont know how to code it.
this is my code in version 2;
public function downloadCoursesTemplate()
{
$columns = array(
'Course Code',
'Course Description',
'Status'
);
return Excel::download('Courses', function ($excel) use ($columns) {
$excel->sheet('Courses', function ($sheet) use ($columns) {
$sheet->fromArray($columns);
});
})->export('xlsx');
}
this is the output:
I want that on laravel-excel version 3.1
There have documentation in new versions but i could not find it to solve my issue.
Is anyone can help me? thanks. sorry for my English grammar.

