diff --git a/src/Mcamara/LaravelLocalization/LaravelLocalization.php b/src/Mcamara/LaravelLocalization/LaravelLocalization.php index 228ece5..be67090 100644 --- a/src/Mcamara/LaravelLocalization/LaravelLocalization.php +++ b/src/Mcamara/LaravelLocalization/LaravelLocalization.php @@ -647,7 +647,8 @@ protected function substituteAttributesInRoute($attributes, $route, $locale = nu elseif ($value instanceOf UrlRoutable) { $value = $value->getRouteKey(); } - $route = str_replace(array('{'.$key.'}', '{'.$key.'?}'), $value, $route); + if($value) + $route = str_replace(array('{'.$key.'}', '{'.$key.'?}'), $value, $route); } // delete empty optional arguments that are not in the $attributes array