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.
confirmUserCommand
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.
php artisan list
Any suggestions please?
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: ,
php-cli artisan list
, - :)
Laravel 5.2 ~ 5.5:
protected $signature = 'order:check'; //or whatever you want your command to be
, , app\Console\kernel.php.
app\Console\kernel.php
protected $commands = [ \App\Console\Commands\OrderCheck::class, ]
:)
php-artisan, App/http/Kernel.php :
protected $commands = [ 'App\Console\CreateSlugsCommand',.... ];
php artisan list, .