Can't make our own artisan commands??
Created 8 years ago by emergingdzns

I need to add my own artisan command. I tried using php artisan make:command mycommandname but I can’t get it to register in the system. I tried adding it to the protected $commands list in the Kernel.php file. I tried just adding the whole command to the routes/console.php file as well. But nothing I do seems to work. There’s one command in the the routes/console.php file called “inspire” but when I try to run it at command line it errors as does my own command. Any ideas? What's the special magic required to add our own commands?

ryanthompson  —  8 years ago Best Answer

You sure can! However check out this video: http://pyrocms.com/videos/series/module-development/the-anatomy-of-a-module

The kernels are not used but they are left in by default.

Instead you can define commands (among other things) in your addon's ServiceProvider or in config/streams.php.

lckamal  —  7 years ago

How to schedule this job in pyro addon service privider? $schedule->command('emails:send')->everyMinute(); http://take.ms/GfFe6y