From 135a51e348a3fb71bee6a396181038264e9acf4c Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 15 Jan 2021 17:51:51 +0900 Subject: [PATCH 1/2] docs: change sample code of redirect() to be more common --- user_guide_src/source/incoming/filters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/incoming/filters.rst b/user_guide_src/source/incoming/filters.rst index 47dcca091371..e48f0018039a 100644 --- a/user_guide_src/source/incoming/filters.rst +++ b/user_guide_src/source/incoming/filters.rst @@ -69,7 +69,7 @@ This is typically used to perform redirects, like in this example:: if (! $auth->isLoggedIn()) { - return redirect('login'); + return redirect()->to('/login'); } } From 2723d1aa5e089907060dafaf68884b3d11637a50 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 16 Jan 2021 07:58:06 +0900 Subject: [PATCH 2/2] docs: use site_url() Encourage using site_url() since we have so many issues with URLs in subfolders. Co-authored-by: MGatner --- user_guide_src/source/incoming/filters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/incoming/filters.rst b/user_guide_src/source/incoming/filters.rst index e48f0018039a..909584a9ad60 100644 --- a/user_guide_src/source/incoming/filters.rst +++ b/user_guide_src/source/incoming/filters.rst @@ -69,7 +69,7 @@ This is typically used to perform redirects, like in this example:: if (! $auth->isLoggedIn()) { - return redirect()->to('/login'); + return redirect()->to(site_url('login')); } }