The middleware concept (eg. authentication) - The ULTIMATE Web-API course with PHP & Slim [Ep. 004]
In episode 4 we will talk about the concept of middlewares like which mostly stays in contact with authentication, authorization, logging and more. You will learn what actually is a middleware and how to register it. Then we will talk about common traps and like registering to route groups, or only specific single routes.
đ Website:
https://robbelroot.de
đ Official Slim Documentation:
https://www.slimframework.com/docs/v4
đ Chapters
00:16 Recap of last episode
01:20 My little request
01:40 Let's get started
02:37 Easiest middleware example
03:56 A word on HTTP
04:54 Middleware order is important
05:19 A new config file
06:17 Middleware config skeleton
07:00 First middleware
08:00 Getting url parameters inside middlewares
09:57 Creating a response
12:04 Testing the middleware
13:29 Important note
14:44 Avoiding repetitions on responses
15:32 Responding with status text
16:21 A general advice
17:58 Recap
HASHTAGS: #slim #php #middleware #framework #webprogramming #programming #tutorial