laravel/framework — pull request #212 by crhayes (2013-01-30 20:51:55+00:00)
Title: Added isRoute() method to the Request class.

This method is useful for a couple of reasons:

1) When using named routes it's much simpler and cleaner than using Request::is(*pattern*)
2) If the underlying named route changes this code will still work, as opposed to Request::is() (which will require a rewrite of the pattern)

This method is particularly useful inside of views. For instance, it can be used it the following way: