Use singleton instead of share

This commit is contained in:
Barry vd. Heuvel
2017-01-05 09:58:45 +01:00
committed by GitHub
parent df3ecb2843
commit e96943fe6f
+3 -3
View File
@@ -54,19 +54,19 @@ class IdeHelperServiceProvider extends ServiceProvider
$configPath = __DIR__ . '/../config/ide-helper.php'; $configPath = __DIR__ . '/../config/ide-helper.php';
$this->mergeConfigFrom($configPath, 'ide-helper'); $this->mergeConfigFrom($configPath, 'ide-helper');
$this->app['command.ide-helper.generate'] = $this->app->share( $this->app->singleton('command.ide-helper.generate',
function ($app) { function ($app) {
return new GeneratorCommand($app['config'], $app['files'], $app['view']); return new GeneratorCommand($app['config'], $app['files'], $app['view']);
} }
); );
$this->app['command.ide-helper.models'] = $this->app->share( $this->app->singleton('command.ide-helper.models',
function ($app) { function ($app) {
return new ModelsCommand($app['files']); return new ModelsCommand($app['files']);
} }
); );
$this->app['command.ide-helper.meta'] = $this->app->share( $this->app->singleton('command.ide-helper.meta',
function ($app) { function ($app) {
return new MetaCommand($app['files'], $app['view']); return new MetaCommand($app['files'], $app['view']);
} }