laravel custom command not listed

maximus 69 picture maximus 69 · Feb 6, 2015 · Viewed 7.3k times · Source

I have created a custom command called confirmUserCommand with the filename matching the class name (same case). The $name is set to confirmuser.

Running the command php artisan list displays the new command on my local, but not on the server (which is running linux). I did perform a composer dump-autoload and update the relevant composer files to no avail.

Any suggestions please?

Answer

A H Bensiali picture A H Bensiali · Jan 11, 2017

Laravel 5.2 ~ 5.5:

Create your command & edit

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

You will have to find where the commands are created & edit the app\Console\kernel.php file.

in this file under

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

run again

 php artisan list 

It should be listed there :)