I\'ve just upgraded Laravel from 5.0 to 5.1.
I get this error:
Call to undefined method Illuminate\\Foundation\\Application::bindShared()
The following Laravel features have been deprecated and will be removed entirely with the release of Laravel 5.2 in December 2015: ...
The service container's bindShared method has been deprecated in favor of the singleton method. ...
ref: https://laravel.com/docs/5.1/upgrade
So, for example, starting from L5.1 you can safely change:
$this->app->bindShared(UserObserver::class, function ()
{
// ...
});
to:
$this->app->singleton(UserObserver::class, function ()
{
// ...
});