Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/251.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我想要一个通知,通知日期将在下周使用laravel过期_Php_Laravel - Fatal编程技术网

Php 我想要一个通知,通知日期将在下周使用laravel过期

Php 我想要一个通知,通知日期将在下周使用laravel过期,php,laravel,Php,Laravel,我正在使用任务计划进行通知,现在我收到工作许可表中的所有通知,但我希望通知日期将于下周到期。请帮助我如何做到这一点?谢谢 工作许可表 id |姓名|许可证|代码|日期 通知表 身份证|许可证|身份证 应用程序/控制台/命令/CreatePermitWork 你必须先拿到这些记录 $havoToNotif=YourModel::where'date',' $havoToNotif=YourModel::其中'date','$WorkPermissions=WorkPermission::all;

我正在使用任务计划进行通知,现在我收到工作许可表中的所有通知,但我希望通知日期将于下周到期。请帮助我如何做到这一点?谢谢

工作许可表

id |姓名|许可证|代码|日期

通知表

身份证|许可证|身份证

应用程序/控制台/命令/CreatePermitWork


你必须先拿到这些记录
$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);
    }
  }
}