Пример #1
0
 public function aexcel()
 {
     Excel::create('Listado de Usuario', function ($excel) {
         $excel->sheet('Usuarios', function ($sheet) {
             /*$products = Product::all();*/
             $users = user::select('id', 'name', 'username', 'email', 'type', 'active')->get();
             $sheet->fromArray($users);
         });
     })->download('xls');
 }