Here is an example function that i'm trying to run.
protected function schedule(Schedule $schedule)
{
$schedule->call(function () {
$tickets = Ticketit::where('created_at', '<', Carbon::now()->subDays(1))->where('is_notified', false)->get();
foreach ($tickets as $ticket) {
//sending mail
$mail= $message->to('bonderi@strathmore.edu')->body('Your ticket is overdue');
}
})->hourly();
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire