/**
  * 注册当前公众号单例.
  *
  * @return Account
  */
 protected function registerCurrentAccount()
 {
     $this->app->singleton('viease.current_account', function () {
         $repositorie = new AccountRepository(new AccountModel());
         return $repositorie->getById(app('viease.account_service')->chosedId());
     });
 }
Exemple #2
0
 /**
  * 获取Account.
  *
  * @param Int $id AccountID
  */
 private function getAccount($accountId)
 {
     $accountRepository = new AccountRepository(new Account());
     return $accountRepository->getById($accountId);
 }
 /**
  * 展示修改.
  *
  * @param int $id id
  */
 public function getUpdate($id)
 {
     $account = $this->accountRepository->getById($id);
     return admin_view('account.form', compact('account'));
 }
 public function getUpdate($id)
 {
     $account = $this->accountRepository->getById($id);
     return view('weyi.account.update', compact('account'));
 }