Skip to content

Commit

Permalink
Merge pull request #40 from tonysm/bindshared-closure
Browse files Browse the repository at this point in the history
[Fix] The bindShare resolution accepts only Closures
  • Loading branch information
laracasts committed Sep 15, 2014
2 parents eeceb86 + 74c499a commit d67f86b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Laracasts/Commander/CommanderServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ protected function registerCommandTranslator()
*/
protected function registerCommandBus()
{
$this->app->bindShared('Laracasts\Commander\CommandBus', 'Laracasts\Commander\DefaultCommandBus');
$this->app->bindShared('Laracasts\Commander\CommandBus', function($app)
{
return $app->make('Laracasts\Commander\DefaultCommandBus');
});
}

/**
Expand Down

0 comments on commit d67f86b

Please sign in to comment.