PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, March 8, 2022

[FIXED] laravel custom command not listed

 March 08, 2022     laravel, laravel-artisan, php     No comments   

Issue

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?


Solution

Just tore my hair out and found out the issue..

In order to list the artisan commands including the custom ones, you have to invoke the systems PHP CLI Intepreter specifically PHP call.

php artisan list : would list all the commands as expected but not the custom commands you created

php-cli artisan list : This would list the all commands including the custom commands created

Hope this helps someone and save their hair :)



Answered By - maximus 69
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing