Skip to content

Commit 6a81177

Browse files
committed
Document Route::matched.
1 parent 59ae4ab commit 6a81177

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lifecycle.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ You may also do pre and post request processing by registering `before`, `after`
6969

7070
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).
7171

72+
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:
73+
74+
Route::matched(function($route, $request)
75+
{
76+
//
77+
});
78+
7279
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 commit comments

Comments
 (0)