Ejemplo n.º 1
0
 public function export()
 {
     set_time_limit(3000);
     Excel::create('DataPegawai', function ($excel) {
         $excel->sheet('DataPegawai', function ($sheet) {
             $users = employees::orderBy('id')->get();
             $sheet->loadView('export', ['users' => $users->toArray()]);
         });
     })->download('xls');
 }