Return route model/resource name or null if nothing found.

@param string $route
@return string|null
516169
protected function getRouteResource($route)
	{
		if (!config('openapischemas.resource_tag')) {
			$this->parentCommand->error('The "resource_tag" value in your apischemas.php configuration file must defined.');
			exit();
		}
		$routeAction = $route->getAction();
		list($class, $method) = explode('@', $routeAction['uses']);
		$reflection = new ReflectionClass($class);

		$comment = $reflection->getDocComment();
		if ($comment) {
			$docBlock = $this->docBlockFactory->create($comment);
			foreach ($docBlock->getTags() as $tag) {
				if ($tag->getName() === config('openapischemas.resource_tag')) {
					return $tag->getDescription()->render();
				}
			}
		}

		return null;
	}
405482
public function route($route = null)
    {
        if (null === $route) {
            return $this->route;
        }
        $this->route = $route;

        return $this;
    }
901927
protected function getRouteValidationRules($route)
	{
		$routeAction = $route->getAction();
		list($class, $method) = explode('@', $routeAction['uses']);

		$reflection = new ReflectionClass($class);
		$reflectionMethod = $reflection->getMethod($method);

		foreach ($reflectionMethod->getParameters() as $parameter) {
			$parameterType = $parameter->getClass();
			if (! is_null($parameterType) && class_exists($parameterType->name)) {
				$className = $parameterType->name;

				if (is_subclass_of($className, FormRequest::class)) {
					$parameterReflection = new $className;

					if (method_exists($parameterReflection, 'validator')) {
						return $parameterReflection->validator()->getRules();
					} else {
						return $parameterReflection->rules();
					}
				}
			}
		}

		return [];
	}
964028
public static function getRouteByName(string $name) : Route
    {
        foreach (static::$routes as $routes) {
            /** @var Route $route */
            foreach ($routes as $route) {
                if ($route->getName() === $name) {
                    return $route;
                }
            }
        }

        return null;
    }
947258
public function get(string $name){
        foreach($this->routes as $route){
			if($route->matchName($name))
				return $route;
		}
		return null;
    }
334942
public function resolveRoute(): ?Route
    {
        $query = strtolower(rtrim($this->request->query->get('route'), '/'));

        switch(true) {
            case preg_match(self::WITH_IDENTIFIER_PATTERN, $query, $matches):
                $route = $this->detectRouteForWithIdentifierPattern($matches);

                break;
            case preg_match(self::NO_IDENTIFIER_PATTERN, $query, $matches):
                $route = $this->detectRouteForNoIdentifierPattern($matches);

                break;
            default:
                return null;
        }

        return $route;
    }
580264
public function convertRouteParam($route)
    {
        $patterns = array(
            ':any?' => ':[a-zA-Z0-9\.\-_%=]?+',
            ':num?' => ':[0-9]?+',
            ':all?' => ':.?*',
            ':num' => ':[0-9]+',
            ':any' => ':[a-zA-Z0-9\.\-_%=]+',
            ':all' => ':.*',
        );

        $route = str_replace(array_keys($patterns), array_values($patterns), $route);

        return $route;
    }
1325508
public function baseRoute($route)
    {
        if(strpos($route, '@') === 0) {
            $route = substr($route, 1, strlen($route)-1);
        } else {
            $baseRoute = $this->route->getParentRouteName();
            $route		= $baseRoute ? $baseRoute.'.'.$route : $route;
        }

        return $route;
    }
323256
public static function get( $route = null, $callback = null ) {
		// Make sure that our parameters are what they say they are
		$args = self::smart_parameters( func_get_args() );

		return self::route( 'GET', $args[ 'route' ], $args[ 'callback' ] );
	}
963941
public function getResourceConfigurationFromRequest($route)
    {
        // get just the base url without query string
        $route = parse_url($route, PHP_URL_PATH);

        // remove any slashes from begining/end
        $route = trim($route, " /");

        // get the base resource excluding any single identifiers
        $parts = explode('/', $route);
        $resource = is_numeric(end($parts)) ? prev($parts):end($parts);

        return $this->resourceConfigurationFor($resource);
    }
353386
protected function getRegExpRoute($route)
    {
        return preg_replace_callback(
            '#(/?)\{(\S+?)(:(\S+?))?\}#',
            function (array $matches) {
                $startMod = $matches[1];
                $name = $matches[2];
                $type = isset($matches[4]) ? $matches[4] : 'string';

                $type = $this->getTypeRegexp($type);

                $regexp = $startMod . "(?P<$name>$type)";
                if (!$this->isRequiredParam($name)) {
                    $regexp = "({$regexp})?";
                }

                return $regexp;
            },
            $route
        );
    }
343589
public function get($method = null)
    {
        return is_null($method) ? $this->getRoutes() : Arr::get($this->routes, $method, []);
    }
1160379
public function getControllerFromRoute(Route $route)
    {
        $ret = false;
        $actionParts = explode(':', $route->getDefault('_controller'));

        if (count($actionParts) == 2) {
            $ret = $this->container->get($actionParts[0]);
        }

        return $ret;
    }
441815
public function resolveRoute($route)
    {
        $routes = $this->sectionRoutes();
        $sId = $this->resolveSectionId($route);

        if (!isset($routes['sections'][$sId])) {
            return '';
        }

        return $routes['sections'][$sId];
    }
524797
protected function getRouteInformation(Route $route)
    {
        $methods = implode('|', $route->methods());

        return $this->filterRoute(array(
            'host'       => $route->domain(),
            'method'     => $methods,
            'uri'        => $route->uri(),
            'name'       => $route->getName(),
            'action'     => $route->getActionName(),
            'middleware' => $this->getMiddleware($route),
        ));
    }
509248
protected function getRouteInformation(Route $route)
    {
        if ($route->getName()) {
            return [
                'uri'    => $route->uri(),
                'name'   => $route->getName(),
                'before' => $this->getBeforeFilters($route),
            ];
        }

        return null;
    }
542378
private function getModuleName($route)
    {
        if ($route) {
            if (strpos($route, '/') !== false) {
                list($id, $route) = explode('/', $route, 2);
            } else {
                $id = $route;
                $route = '';
            }

            return $id;
        }

        return null;
    }