Hello everyone. I'm working with codeigniter4 where I want to be able to store cookie and then redirect
to another page. If I set a cookie without including redirection process, Cookie stores successfully, But the issue is when I do redirection, the cookie did't saved anymore.
How can I solve and make cookie saved and redirect
PHP Code:
public function loginProcessor(){
helper(['cookie']);
$checkStatus = true;
if ($checkStatus){
set_cookie('nameCookie', 'CookieSomething', time() + 60*60*24*30);
}
return redirect()->to('dashboard');
}