livewire / volt

Volt is an elegantly crafted functional API for Livewire.
https://livewire.laravel.com/docs/volt
MIT License
327 stars 19 forks source link

[1.x] Add example to `make:volt` prompt #12

Closed jessarcher closed 1 year ago

jessarcher commented 1 year ago

This PR updates the make:volt command to include an example when prompting for the missing "name" argument:

image

The goal of these placeholders is typically to prevent a trip to the docs for those that want to use conventional naming. In this case, the example was taken straight from the documentation and tells the user that a lower-case name is typical.

The placeholder feature is only supported on Laravel 10.17 or later, where Laravel Prompts is included. Previous versions that use Symfony's prompts will continue to work without seeing the placeholder.