getMessage(), ['exception' => $e]); return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500); } } // public function exportReports(Request $request) // { // $reportType = $request->input('reportType'); // $states = $request->input('states'); // $startDate = $request->input('startDate'); // $endDate = $request->input('endDate'); // return Excel::download(new ReportExport($reportType, $states, $startDate, $endDate), 'report.xlsx'); // } public function exportReports(Request $request) { $reportType = $request->input('reportType'); $states = $request->input('states'); $startDate = $request->input('startDate'); $endDate = $request->input('endDate'); return Excel::download(new ReportExport($reportType, $states, $startDate, $endDate), 'report.xlsx'); } }