From the course: Building APIs in PHP Using the Slim Micro Framework

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Routing and middleware basics

Routing and middleware basics

From the course: Building APIs in PHP Using the Slim Micro Framework

Start my 1-month free trial

Routing and middleware basics

- [Instructor] Hello and welcome to Routing and Middleware Basics. In this section, we're going to look at our first project requirements and start sketching out the API that will let us accomplish something useful. Notice that I don't say, "Let us create, read, update, and delete database objects." While those things might be useful, throughout this course we're not just building CRUD over HTTP, but something useful and valuable to our end users or customers. It's a subtle distinction, that'll be more important as we get deeper into building our API. So let's talk about the current phase of our project in more detail. Earlier, I said we are taking a simple, Twitter-like service called Chatter, and augmenting it with an API. For this phase, we'll start with the thinnest, simplest layer that will do something useful. In this case, we'll set up our framework and configure a single route to retrieve messages. Each message will have a body, a sender, which is a user who created it, and a…

Contents