From 097714e5e8be7e9e4c27fbe1e507f61500c179af Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 20 Jul 2015 11:20:55 -0500 Subject: [PATCH] wording --- middleware.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/middleware.md b/middleware.md index eb606801006..2c1130f27bd 100644 --- a/middleware.md +++ b/middleware.md @@ -165,7 +165,7 @@ Middleware parameters may be specified when defining the route by separating the Sometimes a middleware may need to do some work after the HTTP response has already been sent to the browser. For example, the "session" middleware included with Laravel writes the session data to storage _after_ the response has been sent to the browser. To accomplish this, define the middleware as "terminable" by adding a `terminate` method to the middleware: **Note:** You must bind your middleware class to container as singleton if you want your `terminate` method to be called on the same instance as the `handle` method. +When calling the `terminate` method on your middleware, Laravel will resolve a fresh instance of the middleware from the [service container](/docs/{{version}}/container). If you would like to use the same middleware instance when the `handle` and `terminate` methods are called, register the middleware with the container using the container's `singleton` method.