How to Create an SMS Portal With Laravel and Twilio
At some point in your application workflow, you may need to pass important information to your users. Thanks to the advancement in web technologies, this can easily be done with push notifications. However, most of these services require your users to have an internet connection and unfortunately, this isn’t always the case. Luckily, we can overcome this by using a notification system that does not rely on the internet.
In this tutorial, we will teach you how to use Twilio’s Programmable SMS to create an SMS notification portal using Laravel. After we’re finished, you would have developed a custom SMS notification portal that allows you to notify your users via a dashboard with SMS.
In order to follow this tutorial, you will need:
- Basic knowledge of Laravel
- Laravel Installed on your local machine
- Composer globally installed
- MySQL setup on your local machine
- Twilio Account
Setup Project ...
How to Build an SMS Payment Notification System for Stripe with Laravel
For many online stores, it’s important as a business owner to be able to receive real-time notifications whenever a sale occurs in your store. In this tutorial, we will be looking at how we can achieve real-time notifications via SMS using Twilio’s REST API whenever a new sale occurs on your store.
To follow along, you’ll need the following:
Create A New Laravel Project
To get started, we need to install a new Laravel project. There are different ways to go about this, but for the sake of this tutorial, we’ll be using Composer. If you’d prefer an alternative, you can visit the docs to learn about the different ways to install a new Laravel project.
Open your terminal, and run the following command:
$ composer create-project ...
How to Send an SMS When Your Cron Job Fails
A modern-day business that relies heavily on tech to operate requires virtually no downtime at all. Case scenario would be an e-commerce business which needs to reconcile its sales every day through cron jobs that run at scheduled times of the day. Mitigating issues when the crons fail takes time since there is no way to alert the stakeholders. This may lead to huge losses or embarrassment to the company depending on the type of reports you are generating via cron.
In this tutorial, we are going to learn how to use the Twilio Programmable SMS API to send text messages when a cron job fails. We will create a simple cron job that sends weekly emails to users then integrate with Twilio Programmable SMS API to send an SMS when the cron fails.
Ensure you have the following installed in your local development environment.
- PHP - Version 7.0 ...
Phone Verification via Voice with Laravel, Twilio, S3 and AWS Polly
Twilio offers an array of products and solutions that enable you to engage your customers. One of which is Programmable Voice that allows you to make and receive calls, as well as monitor calls, using the Voice API.
In this tutorial, you will learn how to use Twilio’s Programmable Voice API to implement a phone number verification system that places a voice call to the user’s phone from your PHP Laravel Application. By the end of the tutorial, you will have developed a PHP Laravel Application with an authentication system that can verify a user’s phone number, by placing a call through to it.
- PHP environment running 7.3+
- A Twilio Account
- An AWS Account and S3 bucket
Setup Laravel and Twilio PHP SDK
Firstly, we need to download Composer, a PHP package manager. We will use Composer to install Laravel and other ...
How to Create an SMS Weather Forecast App using PHP & Twilio
Imagine you’re on vacation and have limited or no access to the internet. Maybe you would like to go surfing or skiing and your access to a forecast is non-existent. This type of scenario is a very good use case of forecasting weather using SMS and a server-side language such as PHP. That's what we are going to learn how to build in this tutorial.
- PHP 7 development environment
- Global installation of Composer
- Twilio Account
- An OpenWeatherMap Account
- Global installation of ngrok
Set Up Our Development Environment
To kick start our project we will need to create a project directory for it. You may use
Weather-Appas this is what I will be using too. In the folder create the following files.
Next, we need to set up our .env file.
NOTE: The .env file is a hidden file we create on ...
How to Track the Conversion Rate of Incoming SMS via a Link Using Google Analytics
You have succeeded in sending a bulk SMS to all your customers to buy your shiny new product, via a link in an SMS. How do you check how many of your customers interacted with the link? We can do this using Google Analytics. Google Analytics is a web analytics service that tracks and report website traffic.
For this tutorial, we will only need a hosted website with a domain.
Creating a Google Analytics account
To create a Google Analytics account go to the URL here and log in with your Google account.
Obtain Tracking ID
The tracking ID is a unique set of characters in the form of
UA-134276880-1that enables tracking for your site. To obtain your unique tracking ID, fill the form as shown below. Click the “Get Tracking ID” button and then accept the terms and conditions as shown in the images below.
Generate Songs with Markov Models using Server-Side Swift, Perfect, and Twilio SMS
I like music and coding and one way to make music with code is by predicting words and generating a new song. You can do this with Markov models, as introduced in this last Twilio blog post. Now let's learn how to train a model on a .txt file to generate a song and then generate another song or text via Twilio SMS with server-side Swift and Perfect.
To code along with this post you should have the following:
- A Twilio account to buy a phone number
- ngrok, a tool for putting the app running on your local machine on the web
First, make a new Single View project in Xcode and run
pod initon the command line in the directory where your Xcode project exists to create a Podfile in order to install the Markov Model library via CocoaPods, as further detailed in the first ...
How to Create a Voice-Based Reservation System in Laravel with Twilio <Pay>
“Please listen carefully, as our menu options have changed.”
It is rare that I find myself memorizing a company’s IVR options. It is much more common for me to repeat "Representative" into the phone and press the 0 key until something works.
As a small business owner, I find most IVRs to be out of touch with reality. While I want to engage my customers 24/7/365, I don’t want to make their lives difficult. I recently had an experience with an airline call center that allowed me to take control of my reservation without ever speaking to a representative.
As a developer and Twilio fan, I began writing pseudo-code in my head of how I could build a simple call center that would not only give my customers a personalized self-service portal, but would also allow for my employees to focus their time on more ...
Encrypting Cookies with Angular Universal and Node.js
Cookies are a ubiquitous feature of web applications, as anyone clicking GDPR notifications for the last several months has realized. Securely handling the data in those cookies is just as much a requirement as the consent notification. Encrypting your Angular and Node.js application cookies is a way to prevent unauthorized access to confidential and personal information, and it’s easy to implement.
As you know, using an httpOnly cookie helps prevent cross-site scripting (XSS) attacks. (You can learn more in another post.) But what about protecting one registered user’s data against another registered user? Are cookies vulnerable to attacks from trusted users?
This post will demonstrate how authenticated users can get unauthorized access to other users’ cookie data. It will also show you how to encrypt your cookies so the data can only be read by your code, not by users.
The code in this post uses the ...
How To Send Commands to a Particle Electron with Programmable Wireless and Laravel GUI
Chances are you have heard about IoT or “Internet of Things”. It’s a big area of tech that estimates over 20 Billion IoT devices by 2020. Also, companies are likely to invest around $15 Trillion in IoT between 2017 and 2025. In this tutorial, we will dive into the world of IoT to obtain an understanding of what it takes to interact with these devices. While our example is simple, you can use these building blocks for more complex examples. Asset tracking or remote control of water pumps are just a couple of examples of what you could build. The possibilities are endless when you connect the Internet to things!