Build the future of communications.
Start Building for Free

PHP posts

  • By Matthew Setter
    Build Your Own URL Shortener With PHP and PostgreSQL Build Your Own URL Shortener With PHP and PostgreSQL

    Recently, my colleague Niels wrote an excellent post showing how to build URL shortener using .NET, and Redis. On reading it, I was so inspired that I decided to build my own URL shortener with PHP and PostgreSQL instead of .NET and Redis, as I know those technologies far better.

    So what’s so fascinating about building a URL shortener? Especially when there are quite a number of other ones, such as Bit.ly, Short.io, or Twilio Messaging Services Link Shortening service. To be honest, the concept just grabbed my attention and inspired me.

    It doesn’t have all of the features you’d likely expect in a professional service, such as URL customisation, analytics and click tracking, branded links, or the ability to add CTAs (Calls To Action). However, it does contain the essentials.

    Tutorial Prerequisites

    To follow along with this tutorial you will need the following:

    Read More
  • By Joseph Udonsak
    Develop a Symfony App Using Svelte and Webpack Encore to Manage Your Twilio Message History Develop a Symfony App Using Svelte and Webpack Encore to Manage Your Twilio Message History

    Globalization has changed more things than one can imagine – and software development is not immune. Combined with the recent trend for separating client side and server side operations, poly-repositories have become a de facto standard for application structure.

    However, for all its benefits it may not be sustainable for small teams or businesses eager to break out of the conceptualization phase and deliver an MVP (Minimum Viable Product). In such scenarios, the visibility and singular source of truth offered by a mono-repository can translate to faster and smoother deployment of new features.

    This article will show you how to combine the new kid on the block, Svelte with the tried-and-trusted Symfony to develop an application, all the while using Webpack Encore to bundle the Svelte app. At the end of this article, you will have built an application to interact with your Twilio message history.

    Prerequisites

    To follow this …

    Read More
  • By Matthew Setter
    Build Your Own Weather Station With PHP, Python and a Raspberry Pi - Part II Build Your Own Weather Station With PHP, Python and a Raspberry Pi - Part II

    In the first part in this series, you learned how to build a weather station with PHP, Python, a Raspberry Pi, and a DHT11 sensor.

    In case you haven't read the tutorial, to summarise, the weather station is composed of two parts:

    1. A Python script that reads humidity and temperature data from the DHT11 sensor and stores it in a SQLite database.
    2. A PHP application that renders the stored data as HTML.

    While that's already pretty decent functionality, how often do you need to look at all of the data? I'm guessing that you're most likely interested in the weather data for just the current, or previous week. Given that, wouldn't it be more convenient to have a daily or weekly summary sent directly to you?

    Here, in the second part in the series, you're going to add the ability to send a daily summary notification via both …

    Read More
  • By Matthew Setter
    Create an Artisan Command to View Twilio Calls Create an Artisan Command to View Twilio Calls

    Laravel's Artisan Console provides a wealth of helpful commands to assist with all manner of tasks when building and managing Laravel applications. It can clear the application and configuration cache, create all manner of classes, generate the application's key, manage database migrations, and so much more.

    In this tutorial, you're going to learn how to create a custom Artisan command to list the voice calls you've made on your Twilio account and print the call information in tabular form.

    Prerequisites

    To follow along with this tutorial, you will need the following:

    Create a new Laravel project

    The first thing to do, if you don't already have an existing Laravel application, is to generate a new one using Composer. To do so, run the …

    Read More
  • By Ijeoma Nelson
    How to Create a News Feed with Goutte and Twilio's Message Scheduling API How to Create a News Feed with Goutte and Twilio's Message Scheduling API

    I've long been a fan of newsreader applications. Mostly for the convenience of being able to keep up with the stories, writers, and publications that interest me. That said, I'm also aware of the negative impact of such apps on my daily productivity.

    The frequent interruption of my concentration by clickbait headlines is proving to be quite frustrating — especially as I fall for it every time. Yet, I'm somewhat hesitant to unsubscribe for the sake of FOMO (Fear of Missing Out).

    For this millennial, the struggle is real. So, if you're like me and you share the dilemma of staying socially current while avoiding the trap of sensational headlines, you will find this tutorial incredibly helpful.

    What will you build?

    You will learn how to create a personalised news feed application that will text the day's headlines at the end of each day. The project will be powered …

    Read More
  • By Matthew Setter
    Make Phone Calls Using PHP and Twilio Programmable Voice Make Phone Calls Using PHP and Twilio Programmable Voice

    There are so many things that you can do in PHP, including creating websites, building command-line tools, generating images, encrypting and decrypting data, and scraping websites.

    But did you know that PHP can also make phone calls? Okay, not on its own it can't, but with the help of Twilio Programmable Voice, it can! In this tutorial, you're going to learn how.

    Prerequisites

    To follow along with this tutorial you will need the following:

    Set up your environment

    The first thing you need to do is to create a project directory and change into it. To do that, run the following commands.

    mkdir twilio-voice-call
    cd twilio-voice-call
    

    Next, create a new file named .env …

    Read More
  • By Prosper Ugbovo
    Send One Time Passwords Over Voice Calls in PHP Using Twilio Verify Send One Time Passwords Over Voice Calls in PHP Using Twilio Verify.

    In recent years, user authentication in web applications has become a serious concern. For example, one-time passwords (OTP) are utilized to verify a user's identity; the most frequent method for sending OTPs is via SMS to the user's registered cellphone number.

    In this tutorial you will learn how to send one-time passwords to users over voice calls in PHP using Twilio's Verify Api. In doing so, you will create an OTP system that can be used as an additional security layer for specific operations in your application.

    Prerequisites

    To follow this tutorial, you need the following:

    Application Process

    Here's …

    Read More
  • By Oluyemi Olususi
    Develop a GraphQL-Powered API With Symfony Develop a GraphQL-Powered API With Symfony

    For years, REST (Representational State Transfer) has been the de facto standard when designing APIs. That's quite understandable, as it's a very straight-forward structure: After sending a request to an endpoint, a JSON (or XML) response is returned to the client.

    However, as applications became more complicated a recurrent theme started to emerge - multiple REST calls are required to populate a view. Enter GraphQL. With GraphQL, the sender of the request determines the structure of the response, thus providing more flexibility and efficiency to the frontend.

    In this article, I will show you how to develop a GraphQL-powered API for an online book store with Symfony.

    Prerequisites

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

    Getting Started

    Create a new Symfony application, and …

    Read More
  • By Oluyemi Olususi
    SymfonyとReactでシングルページアプリケーションを構築する SymfonyとReactでシングルページアプリケーションを構築する

    この記事はOluyemi Olususiこちらで公開した記事(英語)を日本語化したものです。

    はじめに

    PHPで構築されたWebアプリケーションは、優れたユーザー体験を提供するために、フロントエンドで処理される膨大な量のロジックを必要とします。LaravelなどのPHPフレームワークには、Vue.jsを使用してクライアント側のロジックを作成するためのサポートが含まれています。これにより、開発者はこれらの技術を組み合わせることで、アプリケーションを迅速に構築できます。

    Laravelの構造とは逆に、再利用可能なPHPコンポーネントを提供するSymfonyは、特定のライブラリやフロントエンドフレームワークを選びません。開発者は、アプリケーションのフロントエンドのロジックを担うツールを柔軟に選ぶことができます。このチュートリアルでは、SymfonyとReactを使ってシングルページのアプリケーションをシームレスに構築する方法をご紹介します。

    このチュートリアルを最後まで進めると、ReactとSymfonyで作られた再利用可能なユーザーインターフェースコンポーネントを作る方法を学べます。

    前提条件

    このチュートリアルを最後まで進めるには、ReactやSymfonyでアプリケーションを構築するための基本的な知識と、PHPによるオブジェクト指向プログラミングの適度な知識が必要です。

    また、開発するマシンにはNode.jsYarnパッケージマネージャがインストールされていることが必要となります。最後に、依存関係を管理するために、Composerをインストールする必 …

    Read More
  • By Chimezie Enyinnaya
    Sende WhatsApp-Benachrichtigungen mit Laravel Laravel Notifications

    Laravel erleichtert das Senden von Benachrichtigungen in Ihrer PHP-Anwendung. Es bietet vorkonfigurierte Unterstützung für Kanäle wie E-Mail, SMS, Slack und Datenbank. Doch was, wenn wir Benachrichtigungen an andere Kanäle als diese senden wollen, z. B. WhatsApp? In diesem Tutorial zeige ich, wie Sie mit der Twilio-API WhatsApp-Benachrichtigungen in Ihre Laravel-App implementieren können.

    Tools zur Durchführung dieses Tutorials

    Sie benötigen folgende Tools, um dieses Tutorial zu absolvieren:

    Was wir bauen werden

    Wir verwenden für dieses Tutorial das Konzept eines Bestellsystems. Zur Vereinfachung entwickeln wir kein vollwertiges Bestellsystem, sondern lediglich den Teil, der Benachrichtigungen sendet.

    Erstellen einer neuen Laravel-Anwendung

    Wir erstellen zunächst eine neue Laravel-Anwendung. Dazu benötigen wir das oben erwähnte Laravel-Installationsprogramm. Führen Sie den folgenden Befehl in Ihrer Konsole aus:

    $ laravel new laravel-whatsapp-notification
    $ cd laravel-whatsapp-notification
    

    Nachdem die Anwendung erstellt wurde, müssen …

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