public function getRouteNameFromAPath($path)
{
$attributes = $this->extractAttributes($path);
$path = str_replace(url('/'), "", $path);
if ($path[0] !== '/') {
$path = '/' . $path;
}
$path = str_replace('/' . $this->currentLocale . '/', '', $path);
$path = trim($path, "/");
foreach ($this->translatedRoutes as $route) {
if ($this->substituteAttributesInRoute($attributes, $this->translator->trans($route)) === $path) {
return $route;
}
}
return false;
}