diff --git a/src/Illuminate/Foundation/Console/ConfigMakeCommand.php b/src/Illuminate/Foundation/Console/ConfigMakeCommand.php new file mode 100644 index 000000000000..ecd336308586 --- /dev/null +++ b/src/Illuminate/Foundation/Console/ConfigMakeCommand.php @@ -0,0 +1,41 @@ +getNameInput().'.php'; + $stub = $this->files->get($this->getStub()); + + $this->files->put($path, $stub); + $this->info($this->getNameInput().' config created successfully.'); + } + + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + return __DIR__.'/stubs/config.stub'; + } +} diff --git a/src/Illuminate/Foundation/Console/stubs/config.stub b/src/Illuminate/Foundation/Console/stubs/config.stub new file mode 100644 index 000000000000..3ac44ad10138 --- /dev/null +++ b/src/Illuminate/Foundation/Console/stubs/config.stub @@ -0,0 +1,5 @@ + 'command.cache.table', 'ChannelMake' => 'command.channel.make', + 'ConfigMake' => 'command.config.make', 'ConsoleMake' => 'command.console.make', 'ControllerMake' => 'command.controller.make', 'EventGenerate' => 'command.event.generate', @@ -270,6 +272,18 @@ protected function registerConfigClearCommand() }); } + /** + * Register the command. + * + * @return void + */ + protected function registerConfigMakeCommand() + { + $this->app->singleton('command.config.make', function ($app) { + return new ConfigMakeCommand($app['files']); + }); + } + /** * Register the command. *