{"id":2465,"date":"2025-07-18T08:45:27","date_gmt":"2025-07-18T08:45:27","guid":{"rendered":"https:\/\/itnotes.apjsoftwares.in\/?p=2465"},"modified":"2025-07-18T08:53:04","modified_gmt":"2025-07-18T08:53:04","slug":"what-is-middleware-kernel","status":"publish","type":"post","link":"https:\/\/itnotes.apjsoftwares.in\/index.php\/2025\/07\/18\/what-is-middleware-kernel\/","title":{"rendered":"What is Middleware Kernel?"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\"><strong>English:<\/strong> In Laravel, middleware are filters that run before or after a request hits your application. The <strong>Kernel<\/strong> is the place where Laravel manages these middleware. It is like a traffic controller.<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">\ud83d\udd38 <strong>Hindi:<\/strong> Laravel \u092e\u0947\u0902 middleware \u0935\u094b filters \u0939\u094b\u0924\u0947 \u0939\u0948\u0902 \u091c\u094b \u0915\u093f\u0938\u0940 request \u0915\u0947 \u0906\u0928\u0947 \u0938\u0947 \u092a\u0939\u0932\u0947 \u092f\u093e response \u092d\u0947\u091c\u0928\u0947 \u0938\u0947 \u092a\u0939\u0932\u0947 \u091a\u0932\u0924\u0947 \u0939\u0948\u0902\u0964 <strong>Middleware Kernel<\/strong> \u0935\u0939 \u091c\u0917\u0939 \u0939\u0948 \u091c\u0939\u093e\u0901 Laravel \u092f\u0939 \u0924\u092f \u0915\u0930\u0924\u093e \u0939\u0948 \u0915\u093f \u0915\u094c\u0928-\u0915\u094c\u0928 \u0938\u0947 middleware \u0915\u092c \u0914\u0930 \u0915\u0939\u093e\u0901 \u091a\u0932\u0947\u0902\u0917\u0947\u0964<\/h4>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>Real-World Example (Simple Use Case):<\/strong><\/h3>\n\n\n\n<p>Imagine you&#8217;re building a school management system.<\/p>\n\n\n\n<ul>\n<li>You want <strong>every route<\/strong> to check for maintenance mode \u2192 use <strong>global middleware<\/strong><\/li>\n\n\n\n<li>Your <strong>web routes<\/strong> need session and CSRF protection \u2192 use <code>web<\/code> group in middleware kernel<\/li>\n\n\n\n<li>Your <strong>API routes<\/strong> should be rate-limited \u2192 use <code>api<\/code> group<\/li>\n\n\n\n<li>A route like <code>\/admin<\/code> should be accessible only if the user is admin \u2192 use route middleware like <code>admin<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>English: In Laravel, middleware are filters that run before or after a request hits your&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[36],"tags":[],"_links":{"self":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/2465"}],"collection":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/comments?post=2465"}],"version-history":[{"count":2,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/2465\/revisions"}],"predecessor-version":[{"id":2467,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/2465\/revisions\/2467"}],"wp:attachment":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/media?parent=2465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/categories?post=2465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/tags?post=2465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}