简体   繁体   English

在laravel预约前一小时发送通知

[英]send a notification one hour prior to appointment in laravel

In my application, I am trying to do something like this, 在我的应用程序中,我正在尝试做这样的事情,

When a meeting is scheduled, a mail is sent out with the details. 安排会议后,将发送包含详细信息的邮件。 This is working already. 这已经有效了。

Addition to this, I would also like to send out a mail and message prior to one hour before the meeting. 除此之外,我还想在会议开始前一小时之前发送邮件和消息。

How can I do this? 我怎样才能做到这一点?

Should I calculate the time from meeting_scheduled_time when the meeting details are saved and then maybe set a cron on schedule? 我应该在保存会议详细信息时从meeting_scheduled_time计算时间,然后按计划设置一个cron吗? I am not able to see a approach to do this, efficiently. 我无法有效地看到这样做的方法。

A year is passed since you asked your question and now many things have been changed, laravel 5.3 introduced Notifications which does what you ask for, you can notify into different channels like telegram, sms and.. however, you need cron jobs since you are scheduling your notifications. 自你提出问题以来已经过去了一年,现在很多事情已经改变了, laravel 5.3引入了通知 ,它可以满足您的要求,您可以通知不同的渠道,如电报,短信和..但是,你需要cron工作,因为你是安排通知。

Hope it help others :) 希望它能帮到别人:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM