pagination([ 'clientid' => $request->input('client_id'), 'username' => $request->input('username'), ]); } catch (EmqxSupportException $e) { return back()->with('error', $e->getMessage()); } return view('admin.device.index', compact('clients')); } // // public function show(Request $request, $client_id) // { // $emqx = new EmqxSupport(); // // $client = $emqx->clients(['clientid' => $client_id]); // // return view('admin.device.show', compact('client')); // } public function destroy(Request $request): RedirectResponse { $emqx = new EmqxSupport(); if ($request->filled('client_id')) { $emqx->kickClient($request->input('client_id')); } if ($request->filled('username')) { $username = $request->input('username'); $module_name = explode('.', $username)[0]; $this->dispatch(new EMQXKickClientJob(null, $module_name, false)); $this->dispatch(new EMQXKickClientJob(null, $module_name.'.', true)); } return back()->with('success', '正在让它们下线。'); } }