31 lines
501 B
PHP
Executable File
31 lines
501 B
PHP
Executable File
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: lock
|
|
* Date: 2021/7/28
|
|
* Time: 8:51 AM
|
|
*/
|
|
|
|
namespace app\index\controller;
|
|
|
|
|
|
use think\Controller;
|
|
use think\Session;
|
|
|
|
class Admin extends Controller
|
|
{
|
|
/**
|
|
* login
|
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\think\response\View
|
|
*/
|
|
public function login()
|
|
{
|
|
return view();
|
|
}
|
|
|
|
public function logout()
|
|
{
|
|
Session::delete('admin');
|
|
$this->redirect('/admin/login');
|
|
}
|
|
} |