Namespace in lucid "make" command
yeftaw opened this issue · 2 comments
Please add an option to set namespace when creating file like: controller, job, etc. In artisan we can do like this: php artisan make:controller "Catalog\ProductController", then this file will be located on app\Http\Controllers\Catalog\ProductController.php. Can we do it on lucid command which is similar to the artisan command?
Thank you.
Sure, lucid make:controller Users API
will create the UsersController
in the API
service, the namespace for that would be app\Services\API\Http\Controllers\UsersController
.
https://github.com/lucid-architecture/laravel#feature
Unless you are looking to group that service's controllers in separate directories. Something like lucid make:controller Users\Search API
would create the `UsersSearchController.
From an architecture perspective, i believe that the services layer will spare you the need to do this kind of grouping. Maybe consider Catalog as a service itself?
Agreed with you Kinane.