Skip to content

Commit

Permalink
Change shares to singleton in service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljennings authored May 10, 2017
1 parent 5b76181 commit 73cf87d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/NavigatorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function register()
*/
protected function registerStore()
{
$this->app['Coreplex\Navigator\Contracts\Store'] = $this->app->share(function ($app) {
$this->app->singleton('Coreplex\Navigator\Contracts\Store', function($app) {
return (new ReflectionClass($app['config']['navigator']['store']))->newInstanceArgs([$app['config']['navigator']['menus']]);
});
}
Expand All @@ -40,12 +40,12 @@ protected function registerStore()
*/
protected function registerNavigator()
{
$this->app['Coreplex\Navigator\Contracts\Navigator'] = $this->app->share(function ($app) {
$this->app->singleton('Coreplex\Navigator\Contracts\Navigator', function($app) {
return new Navigator(
$app['Coreplex\Core\Contracts\Renderer'],
$app['Coreplex\Navigator\Contracts\Store'],
$app['config']['navigator']
);
});
}
}
}

0 comments on commit 73cf87d

Please sign in to comment.