DEV Community

Discussion on: Laravel 7: Customize stubs

Collapse
 
bertheyman profile image
Bert Heyman

Thanks for writing this article!

Quite nice that the stubs are available to customise.
Only thing I miss though would be a way of using more variables inside the stub. A table name for a model for example, could perhaps be guessed like this: Str::plural(Str::snake($this->argument('model'))).

But extra variables would make things too complex to keep compatible with the generating functions, so I guess for these use cases a custom generator function would be a better choice.