Php 我想要一个通知,通知日期将在下周使用laravel过期
我正在使用任务计划进行通知,现在我收到工作许可表中的所有通知,但我希望通知日期将于下周到期。请帮助我如何做到这一点?谢谢 工作许可表 id |姓名|许可证|代码|日期 通知表 身份证|许可证|身份证 应用程序/控制台/命令/CreatePermitWorkPhp 我想要一个通知,通知日期将在下周使用laravel过期,php,laravel,Php,Laravel,我正在使用任务计划进行通知,现在我收到工作许可表中的所有通知,但我希望通知日期将于下周到期。请帮助我如何做到这一点?谢谢 工作许可表 id |姓名|许可证|代码|日期 通知表 身份证|许可证|身份证 应用程序/控制台/命令/CreatePermitWork 你必须先拿到这些记录 $havoToNotif=YourModel::where'date',' $havoToNotif=YourModel::其中'date','$WorkPermissions=WorkPermission::all;
你必须先拿到这些记录
$havoToNotif=YourModel::where'date',' $havoToNotif=YourModel::其中'date','$WorkPermissions=WorkPermission::all; 我会给你所有的工作许可证 $workpermissions=工作许可证::其中'date','$workpermissions=工作许可证::all; 我会给你所有的工作许可证 $workpermissions=工作许可证::其中'date','
class CreatePermitWork extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'notifications:create';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Permit work notification added !';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$workpermits = WorkPermit::all();
foreach ($workpermits as $permit) {
$ids = array(['permit_id' => $permit->id]);
$this->info("inserting data ".$permit->name);
FacadesDB::table('work_permit_notifications')->insert($ids);
}
}
}