@dalton_moen
To check if a Laravel console command exists, you can make use of Artisan's has()
method. Here's an example:
1 2 3 4 5 6 7 8 9 |
use IlluminateSupportFacadesArtisan; $commandName = 'your:command'; if (Artisan::has($commandName)) { echo "The command $commandName exists!"; } else { echo "The command $commandName does not exist."; } |
You can replace 'your:command'
with the actual name of the command you want to check.