The SitePoint PHP blog has a new tutorial posted showing you how to "interrupt applications with Laravel middleware", adding functionality to your request/response handling in a more automatic and reusable way.
Before we launch into using middleware with Laravel, what is middleware? In general, middleware is software that connects different systems to one another. In Laravel, it’s one of the most well known and robust PHP frameworks that are available for use today, middleware provides a way for you to filter out your HTTP requests and manage those requests. This allows you to dictate how those requests interact with your application.
The use of middleware in Laravel 5 can interrupt requests to your application. [...] Laravel’s middleware can interrupt those requests and then perform various actions such as controlling access and requiring authentication to enter certain areas.
They get into some of the details about middleware, how it "interrupts" your requests and then relate it back to its use in Laravel applications. The tutorial talks about using the "artisan" command line tool to make the middleware and an embedded video from their own Laravel series giving even more detail.