public function getRouteNameFromPath($uri, $locale)
    {
        $attributes = Url::extractAttributes($uri);
        $uri        = str_replace([url('/'), "/$locale/"], '', $uri);
        $uri        = trim($uri, '/');

        foreach ($this->translatedRoutes as $routeName) {
            $url = Url::substituteAttributes($attributes, $this->translate($routeName));

            if ($url === $uri) return $routeName;
        }

        return false;
    }
public function getRouteNameFromPath($uri, $locale)
    {
        $attributes = Url::extractAttributes($uri);
        $uri        = str_replace([url('/'), "/$locale/"], '', $uri);
        $uri        = trim($uri, '/');

        foreach ($this->translatedRoutes as $routeName) {
            $url = Url::substituteAttributes($attributes, $this->translate($routeName));

            if ($url === $uri) return $routeName;
        }

        return false;
    }
public function getRouteNameFromPath ( $ uri , $ locale ) { $ attributes = Url :: extractAttributes ( $ uri ) ; $ uri = str_replace ( [ url ( '/' ) , "/$locale/" ] , '' , $ uri ) ; $ uri = trim ( $ uri , '/' ) ; foreach ( $ this -> translatedRoutes as $ routeName ) { $ url = Url :: substituteAttributes ( $ attributes , $ this -> translate ( $ routeName ) ) ; if ( $ url === $ uri ) return $ routeName ; } return false ; }
Returns the translation key for a given path.

@param  string  $uri
@param  string  $locale

@return false|string
Returns the translation key for a given path .