diff --git a/src/Illuminate/Http/Request.php b/src/Illuminate/Http/Request.php index acfe88b06038..e1a7a6daa957 100644 --- a/src/Illuminate/Http/Request.php +++ b/src/Illuminate/Http/Request.php @@ -167,7 +167,7 @@ public function segment($index, $default = null) */ public function segments() { - $segments = explode('/', $this->path()); + $segments = explode('/', $this->decodedPath()); return array_values(array_filter($segments, function ($v) { return $v != ''; @@ -182,7 +182,7 @@ public function segments() public function is() { foreach (func_get_args() as $pattern) { - if (Str::is($pattern, urldecode($this->path()))) { + if (Str::is($pattern, $this->decodedPath())) { return true; } }