Fixed redirects with “cachet_redirect” helper

This commit is contained in:
Davide Bellini
2016-10-13 09:51:44 +02:00
parent aff834cac0
commit 05f93e16e8
13 changed files with 83 additions and 62 deletions

View File

@@ -58,13 +58,13 @@ class UserController extends Controller
try {
Auth::user()->update($userData);
} catch (ValidationException $e) {
return cachet_route('dashboard.user')
return cachet_redirect('dashboard.user')
->withInput($userData)
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.edit.failure')))
->withErrors($e->getMessageBag());
}
return cachet_route('dashboard.user')
return cachet_redirect('dashboard.user')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success')));
}
@@ -82,6 +82,6 @@ class UserController extends Controller
event(new UserRegeneratedApiTokenEvent($user));
return cachet_route('dashboard.user');
return cachet_redirect('dashboard.user');
}
}