livewire / volt

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

Add stub option to make command #101

Closed inmanturbo closed 6 months ago

inmanturbo commented 6 months ago

Depends on https://github.com/laravel/framework/pull/50709

Usage:

Supports passing either the name of a stub, or full path to a stub as an option

php artisan make:volt "todos/create" --stub="volt-create-form"

Will find and use base_path('stubs/volt-create-form.stub') if it exists.

php artisan make:volt "todos/create" \
  --stub="/home/taylor/stubs/volt/forms/create-form.stub"

will find and use /home/taylor/stubs/volt/forms/create-form.stub if it exists.

If it cannot find a stub under the name or path, it will ignore the option altogether and behave as it always has.