Permalink
Browse files

Updating service provider to utilise app singleton method as app shar…

…e method has been removed in Laravel 5.4.
  • Loading branch information...
1 parent f08f49d commit 7bccd4994cb280304dae7435a24aac53b4e90182 Bradley Cornford committed Jan 27, 2017
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/Cornford/Googlmapper/MapperServiceProvider.php
@@ -40,13 +40,13 @@ public function register()
$configPath = __DIR__ . '/../../config/config.php';
$this->mergeConfigFrom($configPath, 'googlmapper');
- $this->app['mapper'] = $this->app->share(function($app)
- {
- return new Mapper(
- $this->app->view,
- $app['config']->get('googlmapper')
- );
- });
+ $this->app->singleton(
+ 'mapper',
+ function($app)
+ {
+ return new Mapper($this->app->view, $app['config']->get('googlmapper'));
+ }
+ );
}
/**

0 comments on commit 7bccd49

Please sign in to comment.