I just upgraded an old project from October 1 to 2. I have a button in a controller than, when pressed, runs this code:
Artisan::call(‘realestate:xmlimport’);
This doesn’t work after the update, I get the error "“The command “realestate:xmlimport” does not exist.” on line 181 of C:\wamp64\www\finquesgrau\vendor\laravel\framework\src\Illuminate\Console\Application.php
The command is correctly registered in the Plugin.php register method, and it runs perfectly from the command line. What should I do to be able to call artisan commands from a controller?
It says that the command october:about doesn’t exist (neither in the command line, I think that it doesn’t exist in october v2), but if I run Artisan::call(‘october:migrate’), it works ok
I checked that it has to be like this both in OC2 and OC3. The doc for OC2 is not correct Development - October CMS - 2.x (it is ok for OC3)
It’s curious that if I only remove the param it works with $name also, the problem only arises when there are optional arguments, this works: protected $name = 'realestate:xmlimport';