Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for php artisan stub:publish? #110

Open
simplenotezy opened this issue Aug 29, 2021 · 1 comment
Open

Support for php artisan stub:publish? #110

simplenotezy opened this issue Aug 29, 2021 · 1 comment

Comments

@simplenotezy
Copy link

I was wondering if we could get support for php artisan stub:publish?

@yuliusardian
Copy link

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';
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants