Skip to content

Commit

Permalink
update service provider
Browse files Browse the repository at this point in the history
Signed-off-by: Suhayb Wardany <[email protected]>
  • Loading branch information
suwardany committed Jan 30, 2017
1 parent 5888b62 commit 885e954
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Laravel/AlertsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
namespace Cartalyst\Alerts\Laravel;

use Illuminate\Support\ServiceProvider;
use Cartalyst\Alerts\Notifiers\Notifier;
use Cartalyst\Alerts\Notifiers\FlashNotifier;
use Cartalyst\Alerts\Storage\IlluminateSession;

class AlertsServiceProvider extends ServiceProvider
Expand Down Expand Up @@ -80,13 +82,11 @@ protected function registerAlerts()

$alerts = $this->app->make('Cartalyst\Alerts\Alerts');

$alerts->addNotifier(
$this->app->make('Cartalyst\Alerts\Notifiers\Notifier', [ 'view', $config['classes'] ])
);
$viewNotifier = new Notifier('view', $config['classes']);
$flashNotifier = new FlashNotifier('flash', $config['classes'], $this->app['Cartalyst\Alerts\Storage\StorageInterface']);

$alerts->addNotifier(
$this->app->make('Cartalyst\Alerts\Notifiers\FlashNotifier', [ 'flash', $config['classes'] ])
);
$alerts->addNotifier($viewNotifier);
$alerts->addNotifier($flashNotifier);

$alerts->setDefaultNotifier($config['default']);

Expand Down

0 comments on commit 885e954

Please sign in to comment.