Twilio Blog: How to Send SMS Reminders from PHP Symfony Applications
On the Twilio blog today Sylvan Ash has written up a tutorial showing how to send SMS reminders from a Symfony application as reminders of certain events.
If you have a booking system, making appointments such as massage or other therapist bookings, dental or medical appointments, etc., you’d probably like to remind the client about the booking they made on the day of the appointment. In some cases, you might also want to remind the person offering the service. In this tutorial, you'll learn how to send SMS reminders to clients of their upcoming massage appointments, at a designated time before the appointment, in a Symfony project using Twilio's SMS service.
The tutorial starts with a brief description of the setup and uses Composer to create a new Symfony project (the "Appointments" application). It then moves on to the models, defining the structure for the User
and Appointment
entities. It also shows how to make use of the seeding functionality to create several default users. Next up comes the Twilio integration: installing the SDK via Composer, defining the configuration and adding the client as a service.
With all of that set up, the final pieces are shown: the command to send the SMS messages via the Twilio service and the cron job to run it once a day at midnight.