-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[10.x] Allows specifying the name of the stubs to be published #49691
Conversation
Very nice addition! I noticed the command uses Or even better: |
@devajmeireles I like the |
May be After merging this #49698. Please update the test case! |
This pull request was sent before of your. The correct is to do the inverse. Waiting for the merge of this to improve your pull request. I suggest you change your pull request to draft and mark this pull request. |
Okay! I will take care of it. |
I kinda wonder if a better approach might be to group all stubs by "type" or something so we could surface this a bit better using Laravel Prompts? |
Makes sense! Would you be happy for me to work on that @taylorotwell? |
Hey @lukeraymonddowning, Ironically, I just came across this PR after working on a Laravel Prompts implementation myself a few days ago. I wanted to share that I’ve submitted a PR here: #53757 Feel free to provide any feedback. 👍 |
Hey all,
This is a small PR that allows you to limit the stubs that are published when running
php artisan stub:publish
.Usage
If you only want to publish stubs for migrations, execute
php artisan stub:publish --only=migration
. Any stubs that start withmigration
will be published.If you omit the name, all stubs will be published as before. If no stubs match the given name, an error will be displayed to the user.
I contributed this because I'm often interested in editing just one stub, and don't want to have to delete all of the stubs that get published into the application. Thought is was a nice little DX improvement.
As always, thank you for your hard work.
Kind Regards,
Luke