I need to create a number of files in a specific format. So I planned to create a generate command by extending GeneratorCommand. I want to create view files and view-config files in application root directory.
The problem is, I did not find any official doc to do so. There are some article in the web, which suggests to use getDefaultNamespace method to set the path like the following. I was following the steps suggested at https://laravelpackage.com/06-artisan-commands.html#creating-a-generator-command. But I want to create files in root dir not into app dir. When i remove the $rootNamespace form the method it does not create files.
protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace.'\Actions';
}
how can i create a command to generate files in specific directories in the application?