Just like in title. I'm trying to run from artisan
php artisan command:make NameOfCommand
but all I see is
There are no commands defined in the "command" namespace.
Any idea what is this?
As the documentation says (Current version is 5.2 at this moment):
Once your command is finished, you need to register it with Artisan so it will be available for use. This is done within the app/Console/Kernel.php file.
in the Kernel.php file you must add:
protected $commands = [
Commands\NameOfCommand::class
];
(ref: https://laravel.com/docs/5.2/artisan#registering-commands)
You have misplaced the command it is
php artisan make:command NameOfCommand
and not
php artisan command:make NameOfCommand
If you have simply write php artisan
within your command prompt it'll show you the list of commands over there have a look
In laravel 5.2 use php artisan make:console NameOfCommand
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With