As we all know, authentication is a very important aspect of building an application because you want to ensure that users can only access routes and information that they're allowed to.
Authentication takes many forms and a common one is tokenization which we will be focusing on in this tutorial.
Tokenization replaces a sensitive data element, for example, user information such as user id's, names, and emails, with a non-sensitive substitute, known as a token.
But how will issuing tokens be beneficial to multiple authentications? Well, since every user has a unique token, and they can be stored in separate database tables, the token can be queried across these tables to find a match, and based on which return a true, the route can be limited or opened for the user.
In this tutorial, you will learn how to use multiple authentication providers in Lumen to limit access to routes, …
Webhooks are generally automated calls made from one application to another, triggered whenever a specific event occurs. Each webhook transfers a payload to the receiving application. For example, Twilio uses webhooks to let you know whenever certain events occur such as an incoming SMS message or a phone call.
A really good use case is when you'd like to be alerted via SMS when different events occur on any third party services integrated with your application. As long as they provide webhooks, we can build a notification system around that.
To follow along, you’ll need the following:
Setting up Lumen
There are different ways to set up a new Lumen …
Every year just before Christmas, this tweet warning about holiday deployments resurfaces within Engineering circles. It is testament to the complications that could arise when we deploy changes to code. For this reason many companies have made the shift to Test Driven Development (TDD).
Developed by @KentBeck , TDD requires that you write tests before writing code. This guarantees that you get instant confirmation that your code behaves as it should. TDD together with Continuous Integration (CI) - the process of testing code and automating the build every time a team member commits changes to a shared repository - helps ensure that production code works as is expected.
In this tutorial, we will, using TDD, build a small Laravel/Lumen project and use Travis CI for Continuous Integration. We will also build a webhook that listens for failed build triggers. When the build fails, we will send a Twilio …
In the previous tutorial, we worked on creating an iCal feed using Laravel Lumen. An iCal feed allows users to export a calendar event and view it on an external calendar. In this tutorial, we will take an extra step. Using the Twilio API, we will send SMS reminders to users who subscribed to an event.
We are going to extend the application used to create an iCal feed, therefore you need to have followed the previous tutorial. Otherwise, you can clone the code from Github.
We need to install the Twilio SDK for PHP, which makes it easy to interact with the Twilio API from our Lumen application. In your terminal, within the project directory, run the command:
$ composer require twilio/sdk
Update the .env
In the root …
iCal, short for iCalendar, is an internet standard file format used to store calendar information. Being a standard format, it is compatible with most online calendars, giving you access to important dates regardless of your preferred client (Google Calendar, Outlook Calendar, Apple Calendar, etc.). Even popular online services use the iCal format to help their users remember important dates. Airbnb, for example, uses the iCal format to store room availability giving users the ability to export their Airbnb calendar and view it on an external calendar.
In this tutorial, you’ll learn about the iCal format and how to create an iCal calendar feed using Lumen, a PHP micro-framework by Laravel that allows you to quickly build elegant APIs.
For this tutorial, you will need:
- A PHP development environment
- A global installation of Composer
- A global installation of ngrok
- A PostgreSQL Database
The iCal Object
Below is …