Welcome Guest, Not a member yet? Register   Sign In
How to set the namespace in the CLI Command (programmatically)?
#1

Hello everyone. My task is to create a spark command that will create a special controller for the module. The essence of the command will be simple, I specify the name of the module, and spark creates a controller in the Controllers directory of this module. An example command would look like this: 
Code:
php spark mycommand <MyModuleName>
The question is how to programmatically set the namespace inside the command handler using standard methods to get the desired namespace of the form Modules\MyModuleName\Controllers in created controller
Reply


Messages In This Thread
How to set the namespace in the CLI Command (programmatically)? - by Avega Soft - 01-18-2024, 08:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB