json($dataTableService->index($request)); } /** * Display the specified resource. */ public function show(OperatorDialogue $operatorDialogue): JsonResponse { return $this->successResponse($operatorDialogue); } /** * Update the specified resource in storage. */ public function download(Request $request, string $id) { // } /** * Remove the specified resource from storage. */ public function excel(Request $request, DataTableService $dataTableService): BinaryFileResponse { $name = 'گزارش از کارتابل پیام های سیستمی ' . now()->format('Y-m-d H:i') . '.xlsx'; $data = $dataTableService->dataTable($request, true); return Excel::download(new OperatorCartableExcel($data['data']), $name); } }