Skip to content

Commit ba24cd2

Browse files
committed
docs: add note for redirect()
1 parent f77d6f4 commit ba24cd2

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)