/** * Get the raw routes for the application. * * @return array * @static */ public static function getRoutes() { return \Laravel\Lumen\Application::getRoutes(); }
/** * Get the route for a route name. * * @param string $routeName * @return array|null */ private function getRouteByName($routeName) { foreach ($this->app->getRoutes() as $route) { if ($route['method'] != 'GET') { return; } if (isset($route['action']['as']) && $route['action']['as'] == $routeName) { return $route; } } return null; }