From a7194e630447a3acc9125d903304420b9aec4e8a Mon Sep 17 00:00:00 2001 From: h1884387 Date: Thu, 6 Jul 2017 12:59:13 +0200 Subject: [PATCH] allow type-hinting --- src/Laracasts/Flash/FlashServiceProvider.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Laracasts/Flash/FlashServiceProvider.php b/src/Laracasts/Flash/FlashServiceProvider.php index 7ac3425..fb1bce5 100644 --- a/src/Laracasts/Flash/FlashServiceProvider.php +++ b/src/Laracasts/Flash/FlashServiceProvider.php @@ -25,9 +25,11 @@ public function register() 'Laracasts\Flash\LaravelSessionStore' ); - $this->app->singleton('flash', function () { - return $this->app->make('Laracasts\Flash\FlashNotifier'); + $this->app->singleton('Laracasts\Flash\FlashNotifier', function ($app) { + return new FlashNotifier($app->make('Laracasts\Flash\SessionStore')); }); + + $this->app->alias('Laracasts\Flash\FlashNotifier', 'flash'); } /**