Getting deeper into Slim Routes - The ULTIMATE Web-API course with PHP & Slim [Ep. 003]
In this episode of the “The ULTIMATE Web-API course” we are going to dive a lot deeper into the routing system of Slim. We will register more route types like POST and we are also going to take a look at grouping routes which eleminates unnecessary overhead. Speaking about routes also involves using route parameters like the "id" in "https://robbelroot.de/api/users/{id:[0-9]+}". Those are basically placeholders which can be used for better routing and validating URLs.
🌐 Video resources: (coming soon) https://robbelroot.de
📖 Chapters
00:00 Intro
00:43 Registering a POST Route
01:34 Organizing Routes
01:59 Creating a config folder
04:53 Grouping Routes
05:51 Creating a route argument
06:48 Receiving args from routes
07:24 Ensuring arg type
08:19 Using regular expressions
09:19 Naming Routes
09:46 Optional Segments
10:03 Additional Route Registering
HASHTAGS: #slim #php #routes #routing #framework #webprogramming #programming #tutorial