Fix some redirect things.

This commit is contained in:
James Cole
2015-07-06 16:12:22 +02:00
parent 6e261abb73
commit c1f142af78

View File

@@ -215,13 +215,11 @@ class AccountController extends Controller
// set value so create routine will not overwrite URL: // set value so create routine will not overwrite URL:
Session::put('accounts.create.fromStore', true); Session::put('accounts.create.fromStore', true);
return Redirect::route('accounts.create')->withInput(); return redirect(route('accounts.create', [$request->input('what')]))->withInput();
} }
// redirect to previous URL. // redirect to previous URL.
return Redirect::to(Session::get('accounts.create.url')); return redirect(Session::get('accounts.create.url'));
} }
/** /**
@@ -258,11 +256,11 @@ class AccountController extends Controller
// set value so edit routine will not overwrite URL: // set value so edit routine will not overwrite URL:
Session::put('accounts.edit.fromUpdate', true); Session::put('accounts.edit.fromUpdate', true);
return Redirect::route('accounts.edit', [$account->id])->withInput(['return_to_edit' => 1]); return redirect(route('accounts.edit', [$account->id]))->withInput(['return_to_edit' => 1]);
} }
// redirect to previous URL. // redirect to previous URL.
return Redirect::to(Session::get('accounts.edit.url')); return redirect(Session::get('accounts.edit.url'));
} }