Twilio Controller for Laravel and Lumen
2 lines to send a text using Twilio (for Laravel and Lumen)
TextController.phpinto your Controllers folder
- Edit your
.envfile to insure that the 3 new variables form this
.envfile are added (with your Twilio API info)
- Include the
TextControlleranywhere you want to send a text message
- Pass in a phone number into a new instance of
TextControllerand then call the
text()with e "text message" as the parameter.
Feel free to look at the ExampleController to see how it all works together.