Rename incident events and fixes

This commit is contained in:
Joseph Cohen
2015-08-15 22:15:06 -05:00
committed by James Brooks
parent a93472f544
commit 64ff4d73c2
13 changed files with 116 additions and 20 deletions

View File

@@ -57,10 +57,8 @@ class SubscriberController extends Controller
*/
public function createSubscriberAction()
{
$email = Binput::get('email');
try {
$this->dispatch(new SubscribeSubscriberCommand($email));
$this->dispatch(new SubscribeSubscriberCommand(Binput::get('email')));
} catch (ValidationException $e) {
return Redirect::route('dashboard.subscribers.add')
->withInput(Binput::all())
@@ -68,8 +66,6 @@ class SubscriberController extends Controller
->withErrors($e->getMessageBag());
}
event(new CustomerHasSubscribedEvent($subscriber));
return Redirect::route('dashboard.subscribers.add')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.subscribers.add.success')));
}