Example #1
0
 protected function checkAccount()
 {
     $this->item = Account::withTrashed()->find($this->accountId);
     if (!$this->exist()) {
         throw new \Exception(Lang::get('api.accountNotFound'));
     }
     return true;
 }
 public function destroy($accountId)
 {
     $account = Account::withTrashed()->findOrFail($accountId);
     $isForce = Input::get('forceDelete');
     if (isset($isForce) && $isForce == 'true') {
         $account->forceDelete();
     } else {
         $account->delete();
     }
     return Redirect::to(route('admin.account.index', $account->id));
 }
 public function getShow($accountId)
 {
     $account = Account::withTrashed()->with('game')->findOrFail($accountId);
     return view('account.show', ['account' => $account, 'page_title' => 'Account detail']);
 }