I'm using Laravel 5.3. I have wrote 2 laravel commands but when I call they from the window's cmd, just one works fine(command:name), the other(command:delayedPayment) gives me the next error:
But when I comment the DelayedPayment call, it works fine.
app/Console/Kernel.php
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
protected $commands = [
'App\Console\Commands\GenerateInvoice',
'App\Console\Commands\DelayedPayment',
];
protected function schedule(Schedule $schedule)
{
$schedule->command('command:name')->everyMinute();
$schedule->command('command:delayedPayment')->everyMinute();
}
protected function commands()
{
require base_path('routes/console.php');
}
}
app/Console/Commands/DelayedPayment.php
namespace App\Console\Commands;
namespace App\Http\Business;
namespace App\Http\Entities;
use Illuminate\Console\Command;
class DelayedPayment extends Command
{
protected $signature = 'command:delayedPayment';
protected $description = 'Command description';
public function __construct()
{
parent::__construct();
}
public function handle()
{
...
}
}
Its necessary to do something else?.Thank you in advance!