我正在尝试安排一封电子邮件来提醒明天必须完成的任务的用户。我做了一个自定义命令email:reminder。这是我在自定义命令中的代码:
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Todo;
use Illuminate\Support\Facades\Mail;
class SendReminderEmail extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'email:reminder';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Remind users of items due to complete next day';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute …Run Code Online (Sandbox Code Playgroud)