php - Laravel artisan make:component outside resources folder
When you run php artisan make:component Foo it will always be created inside (root)/resources/views/component.
How can I specify its "parent directory" or any specific directory outside resources folder?
I mean, like creating it at (root)/custom-package/components.
Is there any existing options does make:component command has? or I'm thinking few ways how to achieve this:
- Create a custom commandthat will create thephpandbladefiles to the directory I want.
- Create a new command and extend the Laravel's make:componentcommand to modify its path. (Currently, I can't find yet the Class where I can extend it.)
Or is there a config where I can set it?
Answer
Solution:
maybe you can use:
php artisan make:component Foo --path=your/custom/location
hope this help
Source