Skip to content

Commit d7dfc5b

Browse files
committed
Doc tweaks for redirects. Closes #1501
1 parent 7a69fae commit d7dfc5b

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

system/Language/en/HTTP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
'emptySupportedNegotiations' => 'You must provide an array of supported values to all Negotiations.',
3232

3333
// RedirectResponse
34-
'invalidRoute' => '{0, string} is not a valid route.',
34+
'invalidRoute' => '{0, string} route cannot be found while reverse-routing.',
3535

3636
// DownloadResponse
3737
'cannotSetBinary' => 'When setting filepath can not set binary.',

user_guide_src/source/general/common_functions.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,12 @@ Miscellaneous Functions
244244
// Set a flash message
245245
return redirect()->back()->with('foo', 'message');
246246

247+
When passing a URI into the function, it is treated as a reverse-route request, not a relative/full URI, treating
248+
it the same as using redirect()->route()::
249+
250+
// Go to a named/reverse-routed URI
251+
return redirect('named_route');
252+
247253
.. php:function:: remove_invisible_characters($str[, $url_encoded = TRUE])
248254
249255
:param string $str: Input string

0 commit comments

Comments
 (0)