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 Felistas Ngumi
    Add Querying and Pagination to a CRUD RESTful API in PHP with API Platform and Symfony 4 Add Querying and Pagination to a CRUD RESTful API in PHP with API Platform and Symfony 4.png

    Now that we have created a simple CRUD API, let's learn how to retrieve the data we want using query parameters, customize the pagination of the results, then create custom controllers and endpoints.

    NOTE: This tutorial is Part 2 of a 2-part series. If you haven't completed Part 1, it is available here.

    Adding Custom Operations to Your Endpoints

    API platform automatically creates CRUD operations when the resource is created. Custom operations can be assigned to specific routes if an operation is specified. There are two types of operations for collections and items. Collection operations are operations that act on a group of resources such as retrieving all bucket lists. Item operations are operations that act on a single resource such as retrieving one bucket list. For collection operations, the GET and POST routes are implemented with the GET operation being enabled by default. In item operations, the …

    Read More
  • By Felistas Ngumi
    How to Build a CRUD RESTful API in PHP with API Platform and Symfony 4 How to Build a CRUD RESTful API in PHP with API Platform and Symfony 4.png

    Introduction

    As per the official documentation, API platform is a “powerful but easy to use full-stack framework dedicated to API driven projects”. API platform helps developers significantly speed up their development process, building complex and high performance, hypermedia-driven APIs.

    It ships with Symfony 4, the Doctrine ORM, a dynamic Javascript admin created with React, and React Admin, Varnish Cache server, Helm Chart to help deploy the API in a Kubernetes cluster and a Progressive Web Application skeleton. It also includes a Docker setup for providing Nginx servers to run the API and JavaScript apps. Most inspiring is the ability of API platform to natively generate project documentation with support of OpenAPI!

    In this tutorial, I will take you through how to create a simple bucket list API with CRUD operations.

    Prerequisites

    1. PHP - Version 7.0 or higher.
    2. Docker
    3. Postgres

    Getting Started

    Follow the instructions below to setup your development environment: …

    Read More
  • By Felistas Ngumi
    How To Send Images on WhatsApp using PHP Copy of Photo blog Header 2.png

    Introduction

    WhatsApp is one of the most popular instant messaging applications used globally. It has over 450 million active users every day with an average user checking WhatsApp 23 times in a day. Modern businesses that have upheld online marketing tools in order to reach their customers have recorded tremendous growth in their sales and increased their customer base. In this tutorial, I’m going to take you through how to send WhatsApp messages with image attachments using PHP.

    Prerequisites

    Ensure you have the following installed in your local development environment.

    1. PHP
    2. Twilio Account activated with WhatsApp Sandbox Channel.
    3. Twilio PHP SDK

    Getting Started

    In your preferred terminal, run the following commands:

    $ mkdir demo
    $ cd demo
    $ touch twilioWhatsAppMessaging.php .env
    $ composer require twilio/sdk vlucas/phpdotenv
    

    The above commands create a folder named demo, in which the twilioWhatsAppMessaging.php and .env files are created inside of it. We have …

    Read More
  • By Felistas Ngumi
    How to Send an SMS When Your Cron Job Fails s_GWj3dUVosS0McoBNRkpQY9URIWuNU2TGYt2L9-FCZ0-5RQl88a4rfbWGAUiwaUh-RkPZiOk7uvoOOZgS-cXNBW6lsA05BHAuNkLLmvC6h55ADtw1s8DtpBPkHS8jiBI4wS85h3

    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.

    Prerequisites

    Ensure you have the following installed in your local development environment.

    1. PHP - Version 7.0 …
    Read More
  • By Felistas Ngumi
    How To Send a WhatsApp Message in 30 Seconds with PHP send-a-whatsapp-message-30-seconds-cover-photo.png

    WhatsApp is considered to be one of the top messaging apps globally, with over 1.5 billion users and over 60 billion messages sent per day. It has proven to be secure and reliable over the years and now with recent surveys, online businesses are using it as a communication medium to reach their customers other than the traditional way of sending SMS. In this tutorial, I’m going to take you through how to integrate WhatsApp Messaging into your application using the Twilio API for WhatsApp messaging. Here’s a short 30-second video on how you can achieve this after setting up. 

    This tutorial assumes you have basic knowledge of PHP and Unix/Linux commands. If not, don't be discouraged. I will explain every concept in detail.

    Prerequisites

    Ensure you have the following installed in your local development environment.

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.