-
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] Adds make:view
Artisan command
#48330
Conversation
As author of And, FWIW, this would also close the highest voted issue on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nunomaduro,
This is a very good feature!
I only have a doubt about the functions declarations. Is there some reason about don't add the return type into the function declaration?
I mean, not as a docblock.
For example:
protected function getNameInput(): string
{
}
It's just to know 😅.
Your work is incredible!
* Adds `make:view` Artisan command * Style * Sorts method names * Renames * formatting * formatting --------- Co-authored-by: Taylor Otwell <[email protected]>
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: