Skip to content

Commit

Permalink
Merge pull request #124 from hamrahpay/patch-5
Browse files Browse the repository at this point in the history
Update ConsoleServiceProvider.php
  • Loading branch information
kaidesu committed Dec 3, 2015
2 parents 4ffbf4d + 825a8a5 commit 04f2af6
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/Providers/ConsoleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function register()
$this->registerMigrateRollbackCommand();
$this->registerSeedCommand();
$this->registerListCommand();
$this->registerMakeControllerCommand();

$this->commands([
'modules.make',
Expand All @@ -50,7 +51,8 @@ public function register()
'modules.migrateReset',
'modules.migrateRollback',
'modules.seed',
'modules.list'
'modules.list',
'modules.makeController',
]);
}

Expand Down Expand Up @@ -191,4 +193,19 @@ protected function registerListCommand()
return new \Caffeinated\Modules\Console\Commands\ModuleListCommand($app['modules']);
});
}

/**
* Register the "module:make:controller" console command.
*
* @return Console\ModuleMakeControllerCommand
*/
protected function registerMakeControllerCommand()
{
$this->app->bindShared('modules.makeController', function($app) {
$handler = new \Caffeinated\Modules\Console\Handlers\ModuleMakeControllerHandler($app['modules'], $app['files']);

return new \Caffeinated\Modules\Console\Commands\ModuleMakeControllerCommand($handler);
});
}

}

0 comments on commit 04f2af6

Please sign in to comment.