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:

  1. Create a custom command that will create the php and blade files to the directory I want.
  2. Create a new command and extend the Laravel's make:component command 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