Implement Role Management with SMS updates in PHP using Laravel Bouncer and Twilio SMS
For any set (or family) to function effectively, the members of it must have some defined roles and responsibilities assigned to everyone. This can also be likened to an application, where different users of the application are assigned specific roles and responsibilities. These assigned roles define the access level of a user in the application.
In this tutorial, we will learn how to create and manage roles in a Laravel application, using bouncer packages and the Twilio SDK. The Laravel bouncer package will help us in the role management, while the Twilio SDK will be used to notify users of their assigned responsibilities.
At the end of this tutorial, we will have learned how to create a Laravel application, install a Laravel package and how to integrate the Twilio PHP SDK into Laravel.
Setting up a Laravel Application
This tutorial assumes that you are somewhat familiar with PHP and the ...
In many applications you'll also want to limit access to some data and functions to particular users. While you could do this directly in your service APIs, there's a better way.
This post will show you how to add two-factor authentication (2FA) with Twilio Authy and an authorization web service using JSON Web Tokens (JWTs), a standard for securely storing and transmitting sensitive data.
Authentication with Twilio Authy
Twilio Authy uses push authentications to verify a user's identity. Push authentications are better than passwords because they ...
How to Create A Text-To-Subscribe App in PHP Using Twilio and Laravel
The world has gone global and almost everyone has access to the internet every day. However, we shouldn’t leave out those without smartphones or regular PC’s. One way to cater to them is by creating SMS friendly applications, where even with the least data-capable phones, they can access our services. In this tutorial, we will use Laravel and the Twilio SMS API to make a text-to-subscribe app.
Set Up A Twilio Phone Number
To create a text-to-subscribe app, we need a phone number where our users can send text messages to. When the messages are received they will call our API to trigger the actions.
Login to your Twilio account if you already have one, or ...
Serverless Ruby on AWS Lambda with the Jets framework
When AWS launched Lambda in 2014 there was no love for Ruby. Platforms like Python, Node.js, and Java started the serverless revolution for hosting and running functions in the cloud. At the end of 2018, support for Ruby was finally launched.
You can build with Ruby on Lambda using raw functions and Serverless Application Model (SAM) templates as described in the getting started guide for Ruby on Lambda, but Ruby is all about developer happiness and when the config file is longer than your program the process could be described as painful. Enter the Jets framework a framework that "leverages the power of Ruby to make serverless joyful for everyone."
From Rails to Jets
Jets combines the experience of building a Rails application with the ability to deploy to AWS Lambda and related services, including API Gateway, S3, and DynamoDB. In this post we're going to see how ...
Create an OpenCart SMS Extension to Notify Store Owners of New Orders
In this tutorial, we'll explore how to use the Twilio SMS API to create an OpenCart module that sends an SMS when a customer places an order, registers, or has their order history modified.
OpenCart is a free open source e-commerce platform for online merchants. It provides a professional and reliable foundation from which to build a successful online store. This foundation appeals to a wide variety of users; ranging from seasoned web developers looking for a user-friendly interface to use, to shop owners just launching their business online for the first time.
- PHP development environment using lamp (for Linux users), xampp (for windows users) e.t.c.
- Global installation of Composer
- Twilio Account
- OpenCart Installation
OpenCart requirement and Installation
Understand the OpenCart folder structure
The OpenCart is one of the great examples of MVC framework ...
Call Twilio Functions from iOS in Swift
There are many things you can do from iOS but sometimes, for example, you may need to make a web request to fetch information. With Twilio Functions you can focus on writing the code that matters without having to maintain a server. This tutorial will show you how to set up a Twilio Function that returns a Pokemon joke or two and then call that Function from an iOS application.
Before you get started, you'll need
- a Twilio account to create a Twilio Function
- Xcode installed to make a rudimentary iOS app to call the Function
Make a Twilio Function
The Twilio Function in this tutorial will return a simple hard-coded Pikachu joke. To make that Function, from your Functions page, click the red "+" button to make a new Function.
If this is your first Function, you'll click ...
Create a Real-Time Polling App using Twilio Sync and Laravel PHP
Real-time updates is a feature that is becoming increasingly common in modern web applications. There are several hosted API services that provide real-time functionality to web and mobile applications and Twilio Sync is one of these services.
Sync relies on the concept of state synchronization while making use of sync objects. Sync objects are the primitives you use to make your application's state discoverable and accessible at the right granularity. There are four different object primitives each with a different use case - I won't be talking about the different primitives but this document is a good place to start.
In this tutorial, we'll look at how we can add real-time functionality to a Laravel app while making use of Message Stream sync objects.
NOTE: Sync Message Streams let you broadcast JSON messages at a high rate to an elastic group of subscribers.
I chose Sync Message Streams due to their ...
You'll also get a hands-on introduction to working with MongoDB Atlas as a ...
To follow along, you will need a development server. If you don't already have one installed you can install the Web Server for Chrome extension for Google Chrome.
This post ...
How to Queue Emails in Laravel PHP with Twilio SendGrid
Laravel is one of the most famous PHP MVC frameworks with a great community. It provides all the features that are required to create your project, whether it is for personal or enterprise level usage. One feature that sets Laravel apart from other frameworks is “Laravel Queue”. For any project that needs to defer time consuming tasks, Laravel Queue offers this support out of the box.
This tutorial will help you to implement the Laravel Queue to send emails. After we’re finished, you will have a running Laravel application that allows you to send emails to registered users using Laravel queue to prevent your task from timing out and increase deliverability of your emails. We will use Sendgrid for sending emails because their service will allow us to check out whether your email is read or opened by the user.
- PHP development environment with Laravel
- Composer globally ...