Custom laravel command not specified

I created a custom command called confirmUserCommandwith a file name matching the class name (in the same case). The value of $ name is equal confirmuser.

Running the command php artisan listdisplays a new command on my local, but not on the server (which runs on Linux). I performed the dump-autoload composition and updated the corresponding composer files to no avail.

Any suggestions please?

+4
source share
3 answers

Just pulled out my hair and figured out the problem.

To list the wizard commands, including user ones, you must call the PHP CLI Intepreter system, in particular, a PHP call.

php artisan list: , ,

php-cli artisan list: ,

, - :)

-1

Laravel 5.2 ~ 5.5:

   protected $signature = 'order:check'; //or whatever you want your command to be

, , app\Console\kernel.php.

protected $commands = [
    \App\Console\Commands\OrderCheck::class,
]

 php artisan list 

:)

+11

php-artisan, App/http/Kernel.php :

 protected $commands = [
   'App\Console\CreateSlugsCommand',....
];

php artisan list, .

0

All Articles