diff --git a/src/Illuminate/Support/Uri.php b/src/Illuminate/Support/Uri.php index ea46aa54380b..ac91120a5c6c 100644 --- a/src/Illuminate/Support/Uri.php +++ b/src/Illuminate/Support/Uri.php @@ -333,7 +333,17 @@ public function redirect(int $status = 302, array $headers = []): RedirectRespon } /** - * Create an HTTP response that represents the object. + * Get the URI as a Stringable instance. + * + * @return \Illuminate\Support\Stringable + */ + public function toStringable() + { + return Str::of($this->value()); + } + + /** + * Create an HTTP response that represents the URI object. * * @param \Illuminate\Http\Request $request * @return \Symfony\Component\HttpFoundation\Response @@ -344,7 +354,7 @@ public function toResponse($request) } /** - * Get content as a string of HTML. + * Get the URI as a string of HTML. * * @return string */