Closed
Description
name: Bug report
about: Help us improve the framework by reporting bugs!
Describe the bug
There are two issues with the redirect()
method.
- I am not able to use
return redirect()->to('/');
so I have to follow it up with an exit to make it work. e.g.
public function hello() {
//this won't work;
return redirect()->to('/');
//this works
redirect()->to('/');
exit;
}
- The other issue is none of the redirects are working now since approximately after yesterday (17 nov 2018) evening. To make sure, I haven't accidently broken it, I just downloaded a new copy of CI4-develop and after setup I could see welcome message to confirm everything working fine. Then I made these modifications below to the Home controller. If I try
mylocalsite/home/daljit
it just shows a blank page.
namespace App\Controllers;
use CodeIgniter\Controller;
class Home extends Controller
{
public function index()
{
return view('welcome_message');
}
//--------------------------------------------------------------------
public function daljit()
{
return redirect()->to("/home/hello");
}
public function hello()
{
echo "Hello!";
}
}
CodeIgniter 4 version
CodeIgniter 4 develop branch.
Metadata
Metadata
Assignees
Labels
No labels
Activity