Пример #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param Account $account
  *
  * @return \Illuminate\Http\Response
  */
 public function edit(Account $account)
 {
     // may we edit this brand (is the brand connected to our account)
     if (!$account->mayEdit($this->auth_user)) {
         return Redirect::route('admin.accounts.show', $account->id)->with('message', 'User is not authorized to edit this account.');
     }
     $brands = Brand::lists('name', 'id');
     return view('accounts.edit')->with('account', $account)->with('brand_selection', $brands)->with('disabled_checked', $account->disabled)->with('selected', $account->brand_id)->with('auth_user', $this->auth_user);
 }
Пример #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit(Account $account)
 {
     $brands = Brand::lists('name', 'id');
     return view('accounts.edit')->with('account', $account)->with('brand_selection', $brands)->with('selected', $account->brand_id)->with('user', $this->user);
 }