/** * Disable the account. * * @param Account $account * * @return \Illuminate\Http\RedirectResponse */ public function disable(Account $account) { if (!$account->mayDisable($this->auth_user)) { return Redirect::route('admin.accounts.index')->with('message', 'User is not authorized to disable account "' . $account->name . '"'); } $account->disabled = true; $account->save(); return Redirect::route('admin.accounts.index')->with('message', 'Account "' . $account->name . '" has been disabled'); }