Beispiel #1
0
 /**
  * 提交菜单到微信
  *
  * @param AccountModel $account
  */
 public function saveToRemote($account)
 {
     $menus = $this->menuRepository->menuTree()->toArray();
     $options = get_wechat_options($account->id);
     $easywechat = new Application($options);
     $menus = $this->formatToWechat($menus);
     return $easywechat->menu->add($menus);
 }
Beispiel #2
0
 /**
  * 菜单列表显示.
  *
  * @return mixed
  */
 public function getIndex()
 {
     //获取菜单数据
     $menuTree = $this->menuRepository->menuTree();
     return user_view('menu.index', compact('menuTree'));
 }