diff --git a/app/Http/Controllers/SubscribeController.php b/app/Http/Controllers/SubscribeController.php index 8ac61b19..8a52882a 100644 --- a/app/Http/Controllers/SubscribeController.php +++ b/app/Http/Controllers/SubscribeController.php @@ -57,13 +57,13 @@ class SubscribeController extends Controller $subscriptions = Binput::get('subscriptions'); try { - dispatch(new SubscribeSubscriberCommand($email, false, $subscriptions)); + $subscription = dispatch(new SubscribeSubscriberCommand($email, false, $subscriptions)); } catch (AlreadySubscribedException $e) { - return Redirect::route('subscribe.subscribe') + return Redirect::route('subscribe.manage', $subscription->id) ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure'))) ->withErrors(trans('cachet.subscriber.email.already-subscribed', ['email' => $email])); } catch (ValidationException $e) { - return Redirect::route('subscribe.subscribe') + return Redirect::route('status-page') ->withInput(Binput::all()) ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure'))) ->withErrors($e->getMessageBag()); diff --git a/resources/views/partials/component.blade.php b/resources/views/partials/component.blade.php index 6d915ec9..d05bc6fc 100644 --- a/resources/views/partials/component.blade.php +++ b/resources/views/partials/component.blade.php @@ -9,10 +9,6 @@ @endif - @if(subscribers_enabled()) - - @endif -