lumen-generator
lumen-generator copied to clipboard
Support for `php artisan stub:publish`?
I was wondering if we could get support for php artisan stub:publish?
Yup, It is possible ! I think about it too.
We need to refactor the directory of loaded stubs file from each generator command into custom directory if exist and the fallback is the origin one.
For example :
At file :
src/LumenGenerator/Console/CastMakeCommand.php
There is protected getStub() function :
/**
* Get the stub file for the generator.
*
* @return string
*/
protected function getStub()
{
return __DIR__.'/stubs/cast.stub';
}
We should change something like :
/**
* Get the stub file for the generator.
*
* @return string
*/
protected function getStub()
{
return (config('flipbox.stub.dir') ? config('flipbox.stub.dir') : __DIR__) . '/stubs/cast.stub';
}