Last updated on January 17, 2018
In CodeIgniter you can get current page URL using CodeIgniter URL helper function current_url().
Now you knew how to get current page URL, then append the current page URL to logout URL, here is the code
echo anchor('auth/logout','logout/'.base64_encode(current_url()));
now in your logout method should be something like this :
public function logout($url){ redirect(base64_decode($url)); }
Post By:Arjun
Website: arjunphp.com