I have this code in laravel for export excel:
public function export_excel(Request $request){
$user = user::all();
Excel::create('user', function($excel) use($user) {
$excel->sheet('Sheet 1', function($sheet) use($user) {
$sheet->fromArray($user);
});
})->download('xls');
}
and my route is:
Route::get('user/export/excel','UserController@export_excel');
and my html is:
<a><i class="fa fa-file-excel-o"></i> Export to Excel</a>
I want to send request from REST API with Restangular
and after that get download file.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire