Replies: 1 comment
-
I found out you can already do this, sort of. If anyone reads this and wants to add this functionality, you can make a custom console command and overwrite the default command that generates a view or component. or you could choose to make a custom command so that the original command still behaves like expected. In this command you can replicate the behaviour of generating a view or component, and make the file with whatever content you want. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was surprised that this isn't an implemented feature yet (not to my knowledge, correct me if I'm wrong), but it would be great if we would be able to customize the default blade file template that is generated with
php artisan make:view
orphp artisan make:component
. I saw that editing classes is already possible withphp artisan stub:publish
, but I couldn't find a way to edit the default blade template that is generated. On top of that, it would be very nice if there would be a variable we can use that becomes the filename of the view / component. So we'd be able to do something like this:It's not anything particular, and it wouldn't be a massive timesaver, but it would be a cool thing to have if you have a template for every component and/or view.
Beta Was this translation helpful? Give feedback.
All reactions