for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Console;
use App\Mail\HelloUser;
use Carbon\Carbon;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Illuminate\Support\Facades\Mail;
class Kernel extends ConsoleKernel
{
private $date = '2018-03-20';
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];
* Define the application's command schedule.
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
protected function schedule(Schedule $schedule)
// $schedule->command('inspire')
// ->hourly();
if (substr(Carbon::now(), 0, 10) === $this->date) {
$schedule->call(function () {
Mail::to('[email protected]')->send(new HelloUser());
})->at('08:00');
}
* Register the commands for the application.
protected function commands()
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');