Routes :
Route::get('/exportPurchasing', 'SummaryController@exportPurchasing')->name('exportPurchasing');
Controller :
    public function exportPurchasing(Request $request)
    {
      return [
      Excel::download(new exportRekapPurchasing, 'RekapPurchasing.xlsx'),
      Excel::download(new exportChecklistWH, 'RekapChecklistWH.xlsx')
      ];
    }
Blade :
<form method="get" action="{{ route('exportPurchasing') }}" enctype="multipart/form-data">
          <div class="input-group">
               <input type="text" name="date" class="form-control datepicker" autocomplete="off" value="">
               <div class="input-group-append">
                    <button type="submit" class="btn btn-primary"><i class="fas fa-download"></i> Rekap Purchasing and Checklis WH</button>
               </div>
          </div>
      </form>
When I click the button, I want to get to export data? I Used maatwebsite excel
 
                        
just try this on your button:
Rekap Purchasing and Checklis WH
and define JS fucntion as follow:
and in controller :