[11.x] Support Single and Multi-Selection for Publishing Stubs #53757
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for single and multi-selection using Laravel Prompts in the
stub:publish
artisan command.Screen.Recording.2024-12-04.at.10.43.23.AM.mov
The
stub:publish
command currently publishes all customizable stubs, which now includes 52 stubs. With this change, it adds flexibility for developers who only need to customize a few specific stubs.You can now choose which stubs to publish directly from a selection menu, making it easier to target just the stubs you need.
--all
Option: If you prefer to publish everything, the--all
flag skips the menu and works just like it does today.Examples:
Interactive Mode:
Simply run:
and select one or more stubs from the list:
End Result:
Publish All:
Use the --all flag to publish everything at once: