[10.x] Adds make:view
Artisan command
#48330
Merged
+270
−0
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 pull request adds the long-awaited
make:view
Artisan command. As expected, to get started, you simply have to type:Here are the contents of the
resources/views/users/index.blade.php
file. It's a very simplediv
with an inspirational quote inside:Regarding testing, we've created a custom "testing" stub for this make command. So, if users provide the
--test
option, they will see the following:php artisan make:view users.index --test INFO: View and test [resources/views/users/index.blade.php] created successfully.
And the test's contents:
When using the
--pest
option, they will see the following contents in the test:Finally, if users wish to have an extension other than
blade.php
, they can provide the--extension
option: