Created
October 16, 2020 13:27
-
-
Save blogcacanid/ef5d2a8c9b3b682614258a2d5aec334a to your computer and use it in GitHub Desktop.
LogoutController.php Login Dan Register System CodeIgniter 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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