Creating new artisan command

apolo13 - 4 months ago

Hey,

Basically I need to create a new artisan command, and when I run php artisan make:command SomethingUseful it does create it but I don't see Kernel.php file in there (why?) also even after adding it manually, somehow this new command is not visible... strange... What should I do?

Cheers

Answer

- 4 months ago

Try to register it here /config/streams.php

piterden - 4 months ago

You need to register command in the Service Provider of your addon. Do you have addon?

apolo13 - 4 months ago

No I don't have addon, can't I just use it without any addons?

piterden - 4 months ago

Try to register it here /config/streams.php

apolo13 - 4 months ago

Cool. It works. Thank you.

ryanthompson - 4 months ago

@apolo13 you can also register them in routes/console.php like you normally would in Laravel.