Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free
  • By Oluyemi Olususi
    Build a Single Page Application in PHP with Yii 2.0 and Vue.js Build a Single Page Application in PHP with Yii 2.0 and Vue.js

    In the early days of the web, a series of static HTML files would be linked together to form a website. Clicking on page links would trigger requests to the server which would respond with a new HTML file.

    The rise of JavaScript and the advent of AJAX, however, made it possible to send and receive data from the server without full page reloads. These technologies added dynamism to websites, opening the door for a massive advancement in how websites operate today. For example, by using JavaScript, it is possible to handle user interaction and update websites via asynchronous requests.

    These types of websites became known as Single Page Applications (SPA). On the back of this, several JavaScript libraries and frameworks have risen to prominence - none more so than Vue.js.

    In this article, you will learn how to build a Single Page Application using Vue.js and the Yii …

    Read More
  • By Oluyemi Olususi
    How to Use the Repository Pattern in a Laravel Application How to Use the Repository Pattern in a Laravel Application Header

    A repository can be defined as a layer of abstraction between the domain and data mapping layers, one that provides an avenue of mediation between both, via a collection-like interface for accessing domain objects.

    Modern PHP frameworks, such as Laravel and Symfony, interact with databases via Object-relational mappers (ORMs); Symfony uses Doctrine as its default ORM and Laravel uses Eloquent.

    Both take different approaches in how database interaction works. With Eloquent, Models are generated for each database table, forming the basis of interaction. Doctrine, however, uses the Repository pattern where each Entity has a corresponding repository containing helper functions to interact with the database. While Laravel doesn't provide this functionality out of the box, it is possible to use the Repository pattern in Laravel projects.

    A key benefit of the Repository pattern is that it allows us to use the Principle of Dependency Inversion (or code to …

    Read More
  • By Oluyemi Olususi
    Create One-Time Passwords in PHP with Symfony and Twilio's Verify API Create One-Time Passwords in PHP with Symfony and Twilio's Verify API

    As security threats continue to grow and their impacts become ever-more significant, Two-factor Authentication (2FA) is progressively becoming a de facto security standard. As an extra layer of security to the traditional username/email and password combination normally provided by the user(s) of an application, Two-factor authentication works and can be implemented by:

    • Generating and sending a numeric code to the user's mobile device either via SMS, email, or phone call. This is popularly called One-Time Password (OTP) as it is a short-live password that can only be used once during authentication.
    • Using an authenticator app to provide a constantly rotating set of codes that can be used for authentication when needed.
    • Using push authentication where a user responds to a device push notification to either approve or reject an in-application event.

    In this article, I will show you how to generate an OTP and send it to the user via …

    Read More
  • By Oluyemi Olususi
    Build a Bulk SMS Sender With Twilio, PHP, and Yii2 Build a Bulk SMS Sending Application With Twilio, PHP, and Yii2

    Notifications are an essential feature of an application because they provide an outlet for them to keep the customers updated with activities relating to their accounts. SMS notifications, specifically, provide a large reach due to the sheer number of phones in circulation. They also have the added advantage of accessibility because even customers using feature phones are able to receive notifications.

    Consequently, the question then becomes: how do you send SMS notifications to a large number of phones efficiently? This is because sending SMS notifications sequentially will likely create a scalability bottleneck.

    So in this article, I will show you how to send SMS notifications in bulk using Twilio, which makes managing/dispatching programmable SMS a breeze, and PHP's Yii2 framework. We will build an application that will send customized SMS notifications in bulk to clients via Twilio's SMS API.

    Tutorial Requirements

    To follow this tutorial, you need …

    Read More
  • By Oluyemi Olususi
    Créer un chat vidéo de groupe avec Symfony, PHP, Twilio et React.js Créer un chat vidéo de groupe avec Symfony, PHP, Twilio et React.js

    Si les actualités et les statistiques actuelles sur le télétravail sont un indicateur de l'avenir, il est évident que le travail à domicile va progressivement devenir la nouvelle norme pour les employés du monde entier, y compris de nombreuses entreprises technologiques. Bien que la définition d'une communication efficace puisse varier d'une entreprise à une autre, l'une des façons les plus prometteuses d'améliorer la productivité et de maintenir le contact au sein de votre équipe consiste à utiliser la visioconférence ou le chat.

    Ce tutoriel vous guidera sur la création d'une application de chat en visioconférence à l'aide de Symfony, React.js et Twilio Programmable Video. L'application de chat vidéo permettra aux utilisateurs de se connecter et de participer à un salon de chat prédéfini.

    Conditions préalables

    Pour participer à ce tutoriel, vous aurez besoin des éléments suivants :

    Read More
  • By Oluyemi Olususi
    How to Get Started with Docker Compose and Symfony How to get started with Docker Compose and Symfony

    Developing software across teams is difficult - be it managing codebases or ensuring everything works for everyone at all times.

    While Git has gone a long way in terms of version control and ensuring that everyone can work on a codebase without issues, there's still the risk of disruption as a result of the working environment.

    Developers have varying preferences in terms of preferred operating systems (Windows, macOS, and Linux). The same is also true of the environments their applications are deployed to.

    As a result, when certain errors occur, it becomes difficult to trace the source of the problem. In fact, it can be even more confusing if an error only occurs on one OS, leading to the famous phrase: It works on my machine.

    Enter Docker

    It adds predictability to applications by building them in containers, which are small and lightweight execution …

    Read More
  • By Oluyemi Olususi
    How to Get Started With Docker and Laravel How to Get Started with Docker and Laravel

    You've recently released an app only to find that, within a pretty short period of time, it's all the rage. People can't get enough of it. As a result, requests grow so rapidly that the development team starts talking about "scaling up".

    Once upon a time, this would have meant paying for a more powerful server (vertical scaling). However, the rise of containers in recent years means that it is now possible to rapidly—and relatively cost-effectively—add more containers and scale your application horizontally.

    Doing so gives you two key advantages. First, you don't have to incur additional costs for a more powerful server. Second, you can scale your application up—and down—based on current customer demand.

    In this article, I will show you how to use Docker with a Laravel project. This is the first step in building an application that can be scaled accordingly to handle both surges and dips …

    Read More
  • By Oluyemi Olususi
    Authenticate Yii2 Users Using Twilio Verify Authenticate Yii2 Users Using Twilio Verify

    Registering users in your application is relatively easy enough. Ensuring that they provide valid phone numbers, however, can be a very difficult task.

    Twilio's Verify API guarantees that your application’s database only contains users with verified phone numbers. So In this tutorial, I will show you how you can seamlessly capture and confirm user phone numbers during registration in a Yii2 application, by leveraging Twilio Verify.

    Prerequisite

    To get the most out of this tutorial, you will need the following:

    • A basic understanding of PHP and version 2 of the Yii framework
    • Composer globally installed on your computer
    • A local MySQL database instance
    • A Twilio account

    Application Flow

    During this tutorial, we will build a basic application using the Yii2 framework. It will support the ability to register users, and for users to login and view a simplistic user dashboard. During registration, a unique code will be sent to …

    Read More
  • By Oluyemi Olususi
    Get Started Testing a Yii2 API Using Codeception Get started testing a Yii2 API using Codeception

    Testing (and TDD by extension) has drummed up more than its fair share in terms of significant debates. While proponents and opponents may disagree on specifics, they always come to one conclusion: it is unprofessional to ship untested code. Testing provides a level of assurance, not only that the code meets the provided specification but that it can handle edge cases that may be encountered upon deployment.

    In this article, I will show you how to test a RESTful API built with the Yii framework (version 2)usingCodeception. Built on PHPUnit, Codeception provides support for creating and running unit, functional, and acceptance tests on PHP applications in a unified manner.

    To allow us to focus on the key aspects of testing in this tutorial, we’ll be building on the result of a previous tutorial where Yii2 was used to build a secure RESTful API. You're, however, very free …

    Read More
  • By Oluyemi Olususi
    Build a RESTful API using PHP and Yii2 Build a RESTful API using PHP and Yii2

    Since its introduction, RESTful architecture has redefined the way we think about (and build) software applications by breaking down complex application ecosystems into smaller, more focused applications communicating with each other via RESTful calls.

    Client-Server Architecture allows web clients and mobile apps to communicate with the same infrastructure (such as a server-side API) to provide a seamless user experience.

    In this tutorial, I will show you how to build a RESTful API using the Yii framework (version 2)- a high-performance, component-based PHP framework.

    Prerequisites

    A basic understanding of the Yii framework and PHP will be of help in this tutorial. However, I will provide brief explanations and links to the applicable parts of the official documentation throughout the tutorial. If you’re unclear on any concept, you can review the linked material before continuing.

    Additionally, you need to have the following installed on your system:

    • PHP version 7 or higher with …
    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.