/** * 本地菜单数据同步到微信. * * @return \Illuminate\Http\JsonResponse */ public function getSyncToWechat() { if (!count($this->menuRepository->all())) { return error('本地无菜单数据'); } // 当前选中的公众号 $currentAccount = $this->accountService->chosedAccount(); $this->menuService->saveToRemote($currentAccount); return success('同步成功'); }