Skip to content

[9.x] Fire event before route matched#41765

Merged
taylorotwell merged 2 commits into
laravel:9.xfrom
timroberson:route-matching-event
Apr 1, 2022
Merged

[9.x] Fire event before route matched#41765
taylorotwell merged 2 commits into
laravel:9.xfrom
timroberson:route-matching-event

Conversation

@timroberson

Copy link
Copy Markdown
Contributor

Fire a new RouteMatching event before the router attempts to find a matching route. This event is a companion to the existing RouteMatched event and allows a developer access to work with the request immediately before and after routing. Since this is simply adding a new event that existing applications will not be subscribed to, I believe it is fully backward compatible. Thank you for your consideration.

@timroberson timroberson changed the title Fire event before route matched [9.x] Fire event before route matched Mar 31, 2022
@taylorotwell taylorotwell merged commit 8dd8918 into laravel:9.x Apr 1, 2022
@AdiechaHK

Copy link
Copy Markdown

Hey, @timroberson I don't get your idea, we can achieve the same using middleware so what is the point to raise this event. I just wanted to understand the reason why you added this.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants