public function registerExtractCommand() { // add extract command to artisan $this->app['l4gettext.extract'] = $this->app->share(function ($app) { return new Commands\ExtractCommand(new ProcessBuilder()); }); $this->commands('l4gettext.extract'); }