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

@@ -58,7 +58,7 @@ class SubscriberController extends Controller
try {
$subscriber = Subscriber::create(['email' => $email]);
} catch (ValidationException $e) {
return Redirect::back()
return Redirect::route('dashboard.subscribers.add')
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.subscribers.add.failure')))
->withErrors($e->getMessageBag());
@@ -66,7 +66,7 @@ class SubscriberController extends Controller
event(new CustomerHasSubscribedEvent($subscriber));
return Redirect::back()
return Redirect::route('dashboard.subscribers.add')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.subscribers.add.success')));
}
@@ -83,6 +83,6 @@ class SubscriberController extends Controller
{
$subscriber->delete();
return Redirect::back();
return Redirect::route('dashboard.subscribers.index');
}
}