Made a video explaining Middleware in depth — Grouped Routes, Global Middleware & Passing Parameters (Hindi)

2026-09-12English

Hey everyone,

I've been building a multi-auth task management system as a learning project, and while working on it I realized middleware is one of those concepts that's often explained superficially — most tutorials just show "add this line before the route" without explaining why or when to structure it differently. So I made a video that breaks down three specific patterns:

Grouped route middleware – applying middleware to a set of related routes instead of repeating it everywhere Global middleware – when and why to apply something at the application level vs route level Passing parameters to middleware – making middleware dynamic/reusable instead of hardcoding logic

I tried to focus on the reasoning behind each pattern (trade-offs, when one approach breaks down) rather than just copy-paste code, since that's the part I found most confusing when I was learning this myself. Heads up: the video is in Hindi, so it's aimed at Hindi-speaking devs who might find explanations in their native language easier to follow.

Would love feedback — especially if something wasn't explained clearly or if you'd want me to cover a specific edge case in the next video https://youtu.be/oZy3SbwuBcE

submitted by /u/Round-Pie-7125
[link] [留言] Read original: https://www.reddit.com/r/PHP/comments/1we86dm/made_a_video_explaining_middleware_in_depth/

原文:https://www.a8q9.cn/en/article/en-made-a-video-explaining-middleware-in-depth-grouped-routes-g.html

相关文章