John Davidson

php - redirectint to localhost:8080 on codeigniter 4

0 comments
Message:


I'm trying to make a logout function on codeigniter 4, and I'm realizing there is different things from v3


public function logout(){
session_start();
session_destroy();

return redirect()->to("/");
}

this is not redirecting me to my virtualhost / route its redirecting to localhost:8080/



My Answer:
>to('http://localhost:8080')->with('success', 'Logged out successfully');_ }

Rate this post

5 of 5 based on 4506 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us