You could use Artisan::call('commandName'), but the proper way is to extract the logic to a separate class which is called from both the command and the controller/route.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community