Skip to content

Commit e0cc1e1

Browse files
authored
Merge pull request #6303 from kenjis/fix-docs-redirect
docs: add note for redirect()
2 parents 1d54de4 + ba24cd2 commit e0cc1e1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

user_guide_src/source/general/common_functions.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,12 @@ Miscellaneous Functions
298298
.. php:function:: redirect(string $route)
299299
300300
:param string $route: The reverse-routed or named route to redirect the user to.
301+
:rtype: RedirectResponse
302+
303+
.. important:: When you use this function, an instance of ``RedirectResponse`` must be returned
304+
in the method of the :doc:`Controller <../incoming/controllers>` or
305+
the :doc:`Controller Filter <../incoming/filters>`. If you forget to return it,
306+
no redirection will occur.
301307

302308
Returns a RedirectResponse instance allowing you to easily create redirects:
303309

0 commit comments

Comments
 (0)