Skip to content

Commit 788c4a8

Browse files
committed
Remove unnecessary code
1 parent 4aaf060 commit 788c4a8

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/LocalizedUrlGenerator.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,8 @@ protected function generateFromNamedRoute($locale, $parameters, $absolute)
8585
return '';
8686
}
8787

88-
$name = $this->route->getName();
89-
90-
// Localized routes without a name will still have the locale prefix as a name.
91-
// Strip the prefix from the name to make sure the route has a base name set.
92-
if ($this->stripLocaleFromRouteName($name) === '') {
93-
return '';
94-
}
95-
9688
try {
97-
return route($name, $parameters, $absolute, $locale);
98-
} catch (RouteNotFoundException $e) {
99-
return '';
89+
return route($this->route->getName(), $parameters, $absolute, $locale);
10090
} catch (InvalidArgumentException $e) {
10191
return '';
10292
}

0 commit comments

Comments
 (0)