Skip to content

Instantly share code, notes, and snippets.

@blogcacanid
Created October 16, 2020 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blogcacanid/ef5d2a8c9b3b682614258a2d5aec334a to your computer and use it in GitHub Desktop.
Save blogcacanid/ef5d2a8c9b3b682614258a2d5aec334a to your computer and use it in GitHub Desktop.
LogoutController.php Login Dan Register System CodeIgniter 4
<?php namespace App\Controllers;
class LogoutController extends BaseController
{
public function index()
{
$userData = [
'name',
'email',
'logged_in'
];
session()->remove($userData);
return redirect()->to(base_url('login'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment