References: Important one:
https://laratutorials.wordpress.com/2017/10/03/how-to-import-excel-file-in-laravel-5-and-insert-the-data-in-the-database-laravel-tutorials/
Second Important link:
https://itsolutionstuff.com/post/laravel-53-import-export-csv-and-excel-file-into-databaseexample.html
To download database in excel with specific column:
https://laratutorials.wordpress.com/2017/10/03/how-to-import-excel-file-in-laravel-5-and-insert-the-data-in-the-database-laravel-tutorials/
Second Important link:
https://itsolutionstuff.com/post/laravel-53-import-export-csv-and-excel-file-into-databaseexample.html
To download database in excel with specific column:
public function downloadExcel(Request $request, $type){$data = Item::get()->toArray();return Excel::create('itsolutionstuff_example', function($excel) use ($data) {$excel->sheet('mySheet', function($sheet) use ($data){$sheet->fromArray($data);});})->download($type);}
public function downloadExcel($type)
{
$data = ExcelFile::select('title', 'description', 'date')->get()->toArray();
return Excel::create('Databasce', function($excel) use ($data) {
$excel->sheet('mySheet', function($sheet) use ($data)
{
$sheet->fromArray($data);
});
})->download($type);
}
Comments
Post a Comment