Skip to content

Commit

Permalink
Document Route::matched.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 31, 2014
1 parent 59ae4ab commit 6a81177
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,11 @@ You may also do pre and post request processing by registering `before`, `after`

Listeners to these events will be run `before` and `after` each request to your application. These events can be helpful for global filtering or global modification of responses. You may register them in one of your `start` files or in a [service provider](/docs/ioc#service-providers).

You may also register a listener on the `matched` event, which is fired when an incoming request has been matched to a route but that route has not yet been executed:

Route::matched(function($route, $request)
{
//
});

The `finish` event is called after the response from your application has been sent back to the client. This is a good place to do any last minute processing your application requires. The `shutdown` event is called immediately after all of the `finish` event handlers finish processing, and is the last opportunity to do any work before the script terminates. Most likely, you will not have a need to use either of these events.

0 comments on commit 6a81177

Please sign in to comment.