Can i call the controller method into our shell program?

can i call the controller method into our shell program ?

You shouldn’t, no. Whatever bit of code you need to execute in both the controller and the shell should be moved into some other place, and then both the controller and the shell call it there. Where to move it to depends on what kind of code it is. If it’s very model-related, for example, then moving it into the relevant model is best. If nowhere seems obvious, then create a utility class somewhere (e.g. in an App\Utility namespace) for it.

Thanks for suggestions. I got the right direction.