json($operatorService->datatable($request)); } /** * Display the specified resource. */ public function show(SystemMessage $systemMessage): JsonResponse { return $this->successResponse($systemMessage->only(['id','duration','date', 'voice'])); } public function download(string $id) { // } public function excel(Request $request, OperatorService $operatorService) { $name = 'گزارش از کارتابل پیام های سیستمی ' . now()->format('Y-m-d H:i') . '.xlsx'; $data = $operatorService->dataTable($request, true); return Excel::download(new OperatorCartableExcel($data['data']), $name); } }