Maybe it's because in the command you have the signature as 'emails:send' but the error you're getting from the artisan list is 'email' rather than 'emails'? Hard to say for sure without seeing the list or what you typed though.
Dec 18, 2015
4
Level 3
I can't see my Artisan created command
Hi everyone,
Im trying to create an Artisan command but for some reason is not working.
I can see my command on the list (php artisan list) and when I hit it I get this error:
[InvalidArgumentException]
There are no commands defined in the "email" namespace.
I followed the steps on the official documentation: http://laravel.com/docs/5.1/artisan#writing-commands
This is my file generated on 'app/Console/Commands/SendEmails.php':
<?php
namespace Argemundo\Console\Commands;
use Illuminate\Console\Command;
class SendEmails extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'emails:send';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send Emails queue';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->info('Test.');
}
}
My Laravel version is 5.1.26 (LTS). I "think" that is working fine. I upgraded it manually.
Can someone help me?
Thanks in advance!
Please or to participate in this conversation.