share -> singleton

This commit is contained in:
Samuel Georges 2017-05-20 00:31:50 +10:00
parent 84597b95ce
commit 6136e89a54
1 changed files with 2 additions and 1 deletions

View File

@ -218,7 +218,8 @@ class PluginBase extends ServiceProviderBase
public function registerConsoleCommand($key, $class)
{
$key = 'command.'.$key;
$this->app[$key] = $this->app->share(function ($app) use ($class) {
$this->app->singleton($key, function ($app) use ($class) {
return new $class;
});