Skip to content

Commit

Permalink
Updating service provider to utilise app singleton method as app shar…
Browse files Browse the repository at this point in the history
…e method has been removed in Laravel 5.4.
  • Loading branch information
Bradley Cornford committed Jun 5, 2017
1 parent b829ba4 commit 4f79a68
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/Cornford/Setter/SettingServiceProvider.php
Expand Up @@ -37,15 +37,18 @@ public function register()
$configPath = __DIR__ . '/../../config/config.php';
$this->mergeConfigFrom($configPath, 'googlmapper');

$this->app['setting'] = $this->app->share(function($app)
{
return new Setting(
$this->app->make('Illuminate\Database\DatabaseManager'),
$this->app->make('Illuminate\Config\Repository'),
$this->app->make('Illuminate\Cache\Repository'),
$app['config']->get('googlmapper')
);
});
$this->app->singleton(
'setting',
function($app)
{
return new Setting(
$this->app->make('Illuminate\Database\DatabaseManager'),
$this->app->make('Illuminate\Config\Repository'),
$this->app->make('Illuminate\Cache\Repository'),
$app['config']->get('googlmapper')
);
}
);
}

/**
Expand Down

0 comments on commit 4f79a68

Please sign in to comment.