Completely remove the use of Redirect::back - closes #867

This commit is contained in:
James Brooks
2015-08-13 22:28:30 +01:00
parent bee4055228
commit b393557c8a
25 changed files with 73 additions and 90 deletions

View File

@@ -59,13 +59,13 @@ class UserController extends Controller
try {
Auth::user()->update($items);
} catch (ValidationException $e) {
return Redirect::back()
return Redirect::route('dashboard.user')
->withInput(Binput::except('password'))
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.edit.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::back()
return Redirect::route('dashboard.user')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success')));
}
@@ -79,6 +79,6 @@ class UserController extends Controller
$user->api_key = User::generateApiKey();
$user->save();
return Redirect::back();
return Redirect::route('dashboard.user');
}
}