Skip to content

Commit d67f86b

Browse files
author
laracasts
committed
Merge pull request #40 from tonysm/bindshared-closure
[Fix] The bindShare resolution accepts only Closures
2 parents eeceb86 + 74c499a commit d67f86b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Laracasts/Commander/CommanderServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ protected function registerCommandTranslator()
4949
*/
5050
protected function registerCommandBus()
5151
{
52-
$this->app->bindShared('Laracasts\Commander\CommandBus', 'Laracasts\Commander\DefaultCommandBus');
52+
$this->app->bindShared('Laracasts\Commander\CommandBus', function($app)
53+
{
54+
return $app->make('Laracasts\Commander\DefaultCommandBus');
55+
});
5356
}
5457

5558
/**

0 commit comments

Comments
 (0)