Caleb and I had a discussion on allowing users the ability to customize their Class and/or View stubs, so I threw together a few PRs and they will be available in a future release.
The idea if you are consistently using Livewire to create the same type of functionality, like a modal or a datatable or something else, it would be nice to avoid copy pasting into every new component. Also, maybe you have some markup that you want included in every new component view. You can customize all of this stuff.
Here are a few videos I posted of the functionality:
Internally, it’s a fairly simple implementation (I tried to stick to the single file principle as much as possible, but ended up with 2 files.
StubCommand that will create a new stub that you can customize however you like which uses a
StubParser to parse the input from the command. Once you’ve created your stubs, you can use them by adding
--stub=modal to your make command. Or, if you created a default stub, it will be used automatically.
I hope everyone finds this helpful. Let me know if anyone has questions.