call(function () { // 租赁订单过期提醒|调用设备过期提醒-为一天后或三天后过期的订单发送 $tomorrow = Carbon::tomorrow()->toDateString(); $three_day = Carbon::today()->addDays(3)->toDateString(); $order_ids = OrderDevice::whereIn('end_date', [$tomorrow, $three_day])->pluck('order_id')->unique(); foreach($order_ids as $order_id) { Notification::send($order_id, true); } })->dailyAt('12:00'); /*每分钟执行一次更新租赁设备的时间*/ $schedule->command('updateApplyDevice')->everyMinute(); } /** * Register the Closure based commands for the application. * * @return void */ protected function commands() { require base_path('routes/console.php'); } }