From 385db5fcfc3ba63816dee17878d7658653ca8479 Mon Sep 17 00:00:00 2001 From: Raza Mehdi Date: Tue, 2 Feb 2016 13:03:48 +0500 Subject: [PATCH] Removed undefined method exception Fixes the following error exception when adding the flash notifications package in laravel 5.2: [RuntimeException] Error Output: PHP Fatal error: Call to undefined method Illuminate\Foundation\Application::bindShared() in /var/www/html/laravel-app/vendor/srmklive/flash-notifications/src/FlashAlertServiceProvider.php on line 61 --- src/FlashAlertServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FlashAlertServiceProvider.php b/src/FlashAlertServiceProvider.php index bc80d2c..b92463c 100644 --- a/src/FlashAlertServiceProvider.php +++ b/src/FlashAlertServiceProvider.php @@ -58,7 +58,7 @@ private function registerFlashAlert() 'Srmklive\FlashAlert\FlashAlertSessionStore' ); - $this->app->bindShared('flashalert', function() { + $this->app->singleton('flashalert', function() { return $this->app->make('Srmklive\FlashAlert\FlashAlertHandler'); }); }