From 3bd9d589b03c7cca8e92a84141d13c7857426900 Mon Sep 17 00:00:00 2001 From: Frondor Date: Tue, 4 Jul 2017 15:18:16 -0300 Subject: [PATCH] Implemented getRoutesByName method :muscle: --- src/Illuminate/Routing/RouteCollection.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Illuminate/Routing/RouteCollection.php b/src/Illuminate/Routing/RouteCollection.php index 59058deccfe4..74e6b164accc 100644 --- a/src/Illuminate/Routing/RouteCollection.php +++ b/src/Illuminate/Routing/RouteCollection.php @@ -315,6 +315,16 @@ public function getRoutesByMethod() return $this->routes; } + /** + * Get all of the routes keyed by their name. + * + * @return array + */ + public function getRoutesByName() + { + return $this->nameList; + } + /** * Get an iterator for the items. *