Posted on November 5, 2019 by Guest Ask & Ans
CodeIgniter 4 redirect function not working
After logout, I tried to redirect for the home page. I tried to few ways, but not redirected.
class User extends BaseController
{
public function __construct()
{
helper('url');
}
for the logout function. I used three ways
redirect('/');
or
header("Location:".base_url());
or
route_to('/');
Leave A Comment
What’s happening in your mind about this post !
You must be logged in to post a comment.
1 Comment
Team CodeForHost (November 5, 2019)
as per CI 4
use
if you are using route then use